Closed
Description
Describe the bug
The documentation says that jsoncpp supports valid UTF-8. Unfortunately the optional Byte Order Mark allowed by the spec causes jsoncpp to fail to parse otherwise valid utf8.
To Reproduce
- Build example
readFromStream.cpp
- Validate it works on included
withComment.json
via:./readFromStream withComment.json
- Create a new file:
(echo -en '\xef\xbb\xbf'; cat withComment.json) > withBom.json
- Run:
./readFromStream withBom.json
Expected behavior
The same output on step 4 and step 2. Instead, you get:
* Line 1, Column 1
Syntax error: value, object or array expected.
Desktop (please complete the following information):
- MacOS
- (brew installed jsoncpp)