Closed Norbiros closed 2 years ago
You may firstly check the return code of ParseStream()
.
You may firstly check the return code of
ParseStream()
.
I found it here.
It returns The document itself for fluent API.
.
And I am using it as document for example d["hello"]
...
Also, it is copied example from docs. I didn't change anything, so how I can get this error?
I mean, there may be parsing error or reading error during the parsing process.
You can check d.HasParseError()
and d.GetParseError()
.
If the parsing is fail, the document will be a JSON null type.
Thanks you very much! Everything works great now 😄
hi, could you please share your method to solve this issue? thx!
hi, could you please share your method to solve this issue? thx!
I don't remember my solution, but here is my source code: https://github.com/Norbiros/ConsoleGames/blob/main/games/what_is_this.cpp
Maybe it helps :)
Hi! This is my json file:
And this is my C++ file:
When I execute this code, I get this error:
I looked for a lot of ideas how to fix it, but it just does not work! I think it is problem with code, not with json data...
Please, if anyone know how to fix it, help :) You can view whole code here: https://github.com/Norbiros/ConsoleGames.git