stdx.data.json - enhancement suggestions

Laeeth Isharc via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 2 06:28:11 PDT 2015


On Friday, 1 May 2015 at 20:04:58 UTC, Ilya Yaroshenko wrote:
> This line can be removed:
>                 .map!(ch => ch.idup)
>
>
> On Friday, 1 May 2015 at 20:02:46 UTC, Ilya Yaroshenko wrote:
>> Current std.stdio is deprecated. This ad-hoc should works.
>>
>> 	auto json = File("fileName")
>> 		.byChunk(1024 * 1024) //1 MB. Data cluster equals 1024 * 4
>> 		.map!(ch => ch.idup)
>> 		.joiner
>> 		.map!(b => cast(char)b)
>> 		.parseJSON;

Thanks for this.  I am trying to call parseJSONStream, so I will 
see if that works.

(Sample code here:
https://github.com/s-ludwig/std_data_json/blob/master/source/stdx/data/json/parser.d
)


More information about the Digitalmars-d-learn mailing list