-
Notifications
You must be signed in to change notification settings - Fork 3
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
Extra arrayElement after object in array #7
Comments
This is similar to this issue #6. |
Ok. I understand. If you are ever going to reconsider this, maybe instead of propertyValue / arrayElement, having string/number/literal events feels a little bit closer to the JSON RFC specs. string/number/literal might even be reduced to a single 'literalValue" event with a dynamic value of type String, int, double, bool or null.
I think this could be slightly easier for the consumer of the events. |
Currently, the parser does not have any state so it actually does not know what is it current depth or parent. And I am not sure whether what you introduced can be done without introducing some kind of state. I did not use any state because I believe this is simpler from the perspective of the parser. With that said I am aware that, I am very opinionated/blind because of the current parser implementation so if you can come up with PR I would be happy to check. I am open to changes but no promises 😄 |
Having this json:
{"foo":[{"bar": "baz"}, null]}
I get this sequence of events:
After the object in the array an extra arrayElement with value null is emitted. This can't be ignored because there actually might be a null in the array.
The text was updated successfully, but these errors were encountered: