using vibe.d to parse json

Dicebot via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Mar 25 17:46:51 PDT 2015


On Thursday, 26 March 2015 at 00:41:50 UTC, Laeeth Isharc wrote:
>> Yeah, it is not very intuitive. But it works.
>
> Thanks.
>
> Next question - how can I correctly deal with inconsiderately 
> chosen JSON field names like 'private' (which conflict in a 
> struct declaration with D language keywords).  A hack is to do 
> a search and replace on the JSON before presenting it to 
> vibe.d, but I wondered if there was a better way.  
> Incidentally, vibe doesn't seem to like my replacing private 
> with private_ - whereas privateX works.
>
>
> Laeeth.

index-based access still should work, right? Like obj["private"]


More information about the Digitalmars-d-learn mailing list