-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Parsing from stream leads to an array #589
Comments
This is odd. Can you please provide the code that you execute for this? |
` |
edit the file name to where you have your json |
It seems to be related to that I pass the json document as return value from the readJsonFile function. If I parse it and use it in the same function, there is no array. I can also pass the document as reference to the function that reads it and return it that way. It seems as it is the return value that is not working and it is not related to parsing. |
OK, it is related to the universal initalization. It takes it as an initializer list and thus makes an array out of it. If I change:
to
it works as expected. |
Yes, that is it. We use the braces as array literals, e.g. |
Hello,
I parse the following file from a stream:
Then I send it to an output stream with dump(4), which yields the following output:
It has become embedded in an array. Do you know why and how can I get around it?
If it is consistent, I can of course deal with it as it is.
The text was updated successfully, but these errors were encountered: