August 17, 2015
Why not working: 	
JSONValue x = parseJSONValue(`{"a": true, "b": "test"}`);

but:
string str = `{"a": true, "b": "test"}`;
JSONValue x = parseJSONValue(str);

work fine?
August 17, 2015
I've added some changes in the latest version (docs updated):

- Switched to TaggedAlgebraic with full static operator forwarding
- Removed toPrettyJSON (now the default), added GeneratorOptions.compact
- The bigInt field in JSONValue is now stored as a pointer
- Removed is(String/Integral)InputRange helper functions
- Added opt2() [1] as an alternative candidate to opt() [2] with a more natural syntax

The possible optimization to store the type tag in unused parts of the data fields could be implemented later directly in TaggedAlgebraic.

[1]: http://s-ludwig.github.io/std_data_json/stdx/data/json/value/opt2.html
[2]: http://s-ludwig.github.io/std_data_json/stdx/data/json/value/opt.html
August 17, 2015
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.
August 17, 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?
August 17, 2015
Also I can't build last build from git. I am getting error:

source\stdx\data\json\value.d(25,8): Error: module taggedalgebraic is in file 'taggedalgebraic.d' which cannot be read

August 17, 2015
Am 17.08.2015 um 22:23 schrieb Suliman:
> On Monday, 17 August 2015 at 20:07:24 UTC, Sönke Ludwig wrote:
>>
>> 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?

String is a valid range, but parseJSONValue takes a *reference* to a range, because it directly consumes the range and leaves anything that appears after the JSON value in the range. toJSON() on the other hand assumes that the JSON value occupies the whole input range.
August 17, 2015
Am 17.08.2015 um 22:31 schrieb Suliman:
> Also I can't build last build from git. I am getting error:
>
> source\stdx\data\json\value.d(25,8): Error: module taggedalgebraic is in
> file 'taggedalgebraic.d' which cannot be read
>

Do you use DUB to build? It should automatically download the dependency. Alternatively, it's located here:
https://github.com/s-ludwig/taggedalgebraic/blob/master/source/taggedalgebraic.d
August 17, 2015
> String is a valid range, but parseJSONValue takes a *reference* to a range, because it directly consumes the range and leaves anything that appears after the JSON value in the range. toJSON() on the other hand assumes that the JSON value occupies the whole input range.

Yeas, I understood, but maybe it's better to rename it (or add attention in docs, I seen your changes, but I think that you should extend it more, to prevent people doing mistake that I did) , because I think that it would be hard to understand it for people who come from other languages. I am writing in D for a long time, but still some things make me confuse...


>>Do you use DUB to build? It should automatically download the dependency.
Failed to download http://code.dlang.org/packages/vibe-d/0.7.24.zip: 500 Internal Server Error

Possible it was issue with my provider. I will check it later. Error above was during attempted to download new version of vibed.


August 17, 2015
Also could you look at theme http://stackoverflow.com/questions/32033817/how-to-insert-date-to-arangodb

And suggest your variant or approve on of existent.
August 17, 2015
Am 17.08.2015 um 22:58 schrieb Suliman:
>> String is a valid range, but parseJSONValue takes a *reference* to a
>> range, because it directly consumes the range and leaves anything that
>> appears after the JSON value in the range. toJSON() on the other hand
>> assumes that the JSON value occupies the whole input range.
>
> Yeas, I understood, but maybe it's better to rename it (or add attention
> in docs, I seen your changes, but I think that you should extend it
> more, to prevent people doing mistake that I did) , because I think that
> it would be hard to understand it for people who come from other
> languages. I am writing in D for a long time, but still some things make
> me confuse...

I agree that the naming can be a bit confusing at first, but I chose those names to be consistent with std.conv (to!T and parse!T). I've also just noticed that the parser module example erroneously uses parseJSONValue(). With proper examples, this should hopefully not be that big of a deal.