You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just ran into a problem parsing a string beginning with a Byte Order Mark.
I'm not sure about it, but my understanding is that it remains a valid UTF-8 string even with BOM, therefore it should still be parsed. Or is this out of scope for this library and the caller should take care of it and then just supply the string without BOM?
The text was updated successfully, but these errors were encountered:
Implementations MUST NOT add a byte order mark to the beginning of a JSON text. In the interests of interoperability, implementations that parse JSON texts MAY ignore the presence of a byte order mark rather than treating it as an error.
Which means that I could choose to support parsing UTF-8 with BOM but I don't have to.
Since it is just a small change that doesn't hurt anyone I think I'll do it, although I'm not sure where BOMs for UTF-8 are actually used. (Haven't seen one so far).
Ok, thank you for clearing that up for me.
I just stumbled upon them after editing a UTF-8 file in Microsofts Editor, apparently it adds a BOM by default. Besides that, I haven't seen them so far as well.
Hi,
I just ran into a problem parsing a string beginning with a Byte Order Mark.
I'm not sure about it, but my understanding is that it remains a valid UTF-8 string even with BOM, therefore it should still be parsed. Or is this out of scope for this library and the caller should take care of it and then just supply the string without BOM?
The text was updated successfully, but these errors were encountered: