serde-rs / json

Strongly typed JSON library for Rust
Apache License 2.0
4.87k stars 557 forks source link

A readable example for StreamDeserializer? #1070

Open jaskij opened 1 year ago

jaskij commented 1 year ago

Looking at the current documentation for serde_json::Deserializer, I simply can not figure out what the correct format is for a stream. Is it simply a concatenation of JSON objects?

vidhanio commented 1 year ago

It seems to be written as "Values need to be a self-delineating value e.g. arrays, objects, or strings, or be followed by whitespace or a self-delineating value." It just needs to be 0+ whitespace-seperated json values.

jaskij commented 1 year ago

Yeah, I figured that out, but the documentation was of no help in that.