JSON decode?

Andre Pany via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 27 03:45:45 PDT 2016


Hi,

from a rest call I get a JSON with a strange format:

{"DEPLOY_ATTRIBUTES":"{\n  \"dependency-type\": 
\"soft\"\n}","MTA_METADATA":"{\n  \"id\":...

The sub objects are enclosed with quotes and there are a lot of 
line break characters.
Also the quotes are escaped.
I try to translate a Python script which has no issues to handle 
this JSON correctly,
but I do not understand why.

Python seems to handle this with decode('utf-8')? Is there some 
functionality in Phobos to handle this format correctly?

Kind regards
André





More information about the Digitalmars-d-learn mailing list