in reply to Re^2: Rogue character(s) at start of JSON file (BOM; dumping references)
in thread Rogue character(s) at start of JSON file
> I'm not so sure about that anymore.
Simpl(-istic) example, imagine a data-structure
%unicode = ( ..., "BOM" => "\x{FEFF}", ... )
and transfer it as JSON.
Removing all "\x{FEFF}" would wreck the data.
While a BOM at the strings start is illegal JSON, it's not uncommon.
So removing just a leading BOM, before trying to convert the JSON, is safe.
Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery
|
|---|