aeb-dev / json_events

BSD 3-Clause "New" or "Revised" License
6 stars 3 forks source link

Extra propertyValue after object property #6

Open e-tobi opened 1 year ago

e-tobi commented 1 year ago

When having a json like:

{"id":\"foo", "aaa": {}}

the sequence of events is:

I guess the last propertyValue shouldn't be there.

aeb-dev commented 1 year ago

It actually has a purpose. The reason is propertyValue: value actaully marks the end of property. So if this project was not about streaming the event would be propertyValue: {}. But the object could be huge so I don't want to store it to allocate things unnecessarily. Therefore, instead of returning something I just return propertyValue: null to mark end of property.