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 am trying to test out this parser as I absolutely love the intuitive use of it, however I am having parse errors on a known (albeit huge) good json file.
using this code:
#include<iostream>
#include<json.hpp>
#include<fstream>
#include<iomanip>using json = nlohmann::json;
intmain()
{
//read json file
std::ifstream i("./rawjsondata/matches1.json");
json j;
i >> j;
//write prettified json to another file
std::ofstream o("./prettyrawjsondata/prettymatches1.json");
o << std::setw(4) << j << std::endl;
}
terminate called after throwing an instance of 'nlohmann::detail::parse_error'
what(): [json.exception.parse_error.101] parse error at 9467564: parse error - unexpected '"'
I checked with the manual_lexer branch and got a more detailed warning: [json.exception.parse_error.101] parse error at 9467566: syntax error - invalid string: not well-formed UTF-8 byte; last read '"\303?'
The problem is the byte sequence 0xc3 0x3f which is not well-formed. Byte 0xc3 must be followed by a byte from the range 0x80..0xbf.
I am trying to test out this parser as I absolutely love the intuitive use of it, however I am having parse errors on a known (albeit huge) good json file.
using this code:
on this json file
gives this error:
However, using a quick online json viewer, it gets correctly parsed
The text was updated successfully, but these errors were encountered: