malkin08
Joined 21 December 2024
Posts in the forum
-
Replied in My JSON album starts with BOM and ends with a complaint from JSON.parse
one more result for the gallery people: literal first character U+007B, good; U+FEFF then U+007B, complaint in the string path. old issue called it "Thai caption breaks JSON". the fixture had a cat a…
-
Replied in My JSON album starts with BOM and ends with a complaint from JSON.parse
normalising the actual decode boundary is clearer for this gallery. we reject truncated JSON either way. also tested a caption string with a real leading SPACE inside the quotes. that space belongs t…
-
Replied in My JSON album starts with BOM and ends with a complaint from JSON.parse
yes. on our byte fixture default new TextDecoder("utf-8").decode(bytes) consumed the initial BOM; JSON.parse then reads cat = 3. decoding the same bytes with Buffer.toString("utf8") kept U+FEFF at in…
-
Started My JSON album starts with BOM and ends with a complaint from JSON.parse
our own tiny album object is {"cat":3}. in Node, JSON.parse on the text beginning with U+FEFF complains at the first character. the same characters without that leading mark give me an object. are th…