std.data.json formal review

Suliman via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 17 13:23:54 PDT 2015


On Monday, 17 August 2015 at 20:07:24 UTC, Sönke Ludwig wrote:
> Am 17.08.2015 um 21:32 schrieb Suliman:
>> Why not working:
>> JSONValue x = parseJSONValue(`{"a": true, "b": "test"}`);
>>
>> but:
>> string str = `{"a": true, "b": "test"}`;
>> JSONValue x = parseJSONValue(str);
>>
>> work fine?
>
> toJSONValue() is the right function in this case. I've update 
> the docs/examples to make that clearer.

I think that I miss understanding conception of ranges. I reread 
docs but can't understand what I am missing. Ranges is way to 
access of sequences, but why I can't take input from string? 
string is not range?


More information about the Digitalmars-d mailing list