wanglingsong / JsonSurfer

A streaming JsonPath processor in Java
MIT License
292 stars 55 forks source link

Parsing JSON Sequence #107

Open sigurd-cp opened 7 months ago

sigurd-cp commented 7 months ago

Hi,

For parsing a JSON Sequence, I don't find a JSON path, that parses the objects.

Lets say there is a JSON Sequence {"abc":123}{"xy":"value"}

With JSON path $[*] or $* I got only 123 and value.

Is there a way to parse the sequence?

Best Sigurd

wanglingsong commented 7 months ago

the path should parse a array of object: [{"abc":123},{"xy":"value"}]

sigurd-cp commented 7 months ago

Thanks for your fast response. Arrays working pretty fine. In JSON Streaming approaches, array brackets and commas could be problematic, therefore there are JSON variants, that just use concatenated JSON objects. see Concatenated JSON in https://en.wikipedia.org/wiki/JSON_streaming I'm currently searching for an option to parse such files with JsonSurfer.