Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse error syntax error at line 1 near: #82

Open
majimboo opened this issue Apr 24, 2016 · 2 comments
Open

Parse error syntax error at line 1 near: #82

majimboo opened this issue Apr 24, 2016 · 2 comments

Comments

@majimboo
Copy link

Hello,

What does this error mean? syntax error at line 1 near?
It happens with string err = picojson::parse... where err contains the error.

@brian-kelley
Copy link

Sorry it's been a year, but if anyone else has this problem, it's probably an invalid input stream. For me, making an ifstream(...) and then an istream_iterator like in the example (but with a nonexistent file) didn't throw any exceptions until the parse().

rmisev added a commit to rmisev/picojson that referenced this issue Apr 4, 2017
Adds parse_array_stop(size_t) override which returns true to
the root_context class in the streaming.cc example.

If not overriden, picojson::deny_parse_context::parse_array_stop(size_t)
returns false what causes syntax error.

Related issue: kazuho#82
rmisev added a commit to rmisev/picojson that referenced this issue Sep 10, 2017
Adds parse_array_stop(size_t) override which returns true to
the root_context class in the streaming.cc example.

If not overriden, picojson::deny_parse_context::parse_array_stop(size_t)
returns false what causes syntax error.

Related issue: kazuho#82
@Ryder17z
Copy link

Ryder17z commented Sep 6, 2019

i'm having the same issue when trying to parse a list of cards. Below is a valid sample file that will not parse successfully:
sample.json.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants