A little Go => Python story
Jesse Phillips
Jessekphillips+D at gmail.com
Tue Apr 23 16:57:05 PDT 2013
On Tuesday, 23 April 2013 at 23:09:46 UTC, bearophile wrote:
> * If you're using JSON and your JSON is a mix of types,
> goooooood luck. You'll have to create a custom struct that
> matches the format of your JSON blob, and then Unmarshall the
> raw json into an instance of your custom struct. Much more work
> than just obj = json.loads(json_blob) like we're used to in
> Python land.
I think D already has this addressed, though maybe not with
std.json.
obj = json.loads(json_blob)
to
obj = json.loads!MyType(json_blob)
Defining the type doesn't really seem the major problem with the
Go approach.
More information about the Digitalmars-d
mailing list