std.json

nazriel nazriel6969 at gmail.com
Wed Jul 4 10:51:53 PDT 2012


On Wednesday, 4 July 2012 at 16:55:19 UTC, Ali Çehreli wrote:
> On 07/04/2012 08:25 AM, Alexsej wrote:
> > On Monday, 26 March 2012 at 07:14:50 UTC, Ali Çehreli wrote:
>
> >> // Assumes UTF-8 file
> >> auto content = to!string(read("json_file"));
>
> > Your example only works if the json file in UTF-8 (BOM), how
> to make
> > sure that it worked with the files in UTF-8 without BOM.
>
> I am pretty sure that I have tested it without BOM, which is 
> not recommended nor needed for UTF-8 anyway.
>
> If anything, the file should not have any BOM because it is 
> being converted to a string and is being passed to parseJSON(). 
> I don't think parseJSON() expects a BOM either. Does it?
>
> Ali

Ali, I allowed myself to copy-modify.a.little-paste your example 
to dpaste.dzfl.pl

Hope you don't mind!
Here it is http://dpaste.dzfl.pl/a76157cf



More information about the Digitalmars-d-learn mailing list