struson
struson copied to clipboard
Streaming JSON reader and writer written in Rust
### Enhancement description Once this library has evolved more, and more effort has been put into increasing the processing speed, consider recommending Profile-Guided Optimization in the README as a way...
### Problem solved by the enhancement The current `JsonStreamReader` implementation tries to serve string and number values from the reader buffer, and only if that is not possibly (e.g. in...
### Problem solved by the enhancement Multiple Serde `Serializer` methods take a `len` argument, for example `Serializer::serialize_seq`. Serde JSON does not seem to actually validate this argument, it just checks...
### Enhancement description As seen with #41 it might be useful to add more Serde tests which cover derived implementations, therefore being closer to real code. Could possibly - include...
### Problem solved by the enhancement As pointed out in [this comment on the Rust forum](https://users.rust-lang.org/t/low-level-json-library-struson-version-0-2-0-released/98377/2) (and subsequent comments) and in [this Reddit comment](https://www.reddit.com/r/rust/comments/12vdeff/comment/jhkheyd), Struson's API is currently difficult to...
### Problem solved by the enhancement Both `JsonReader` and `JsonWriter` say that you should abort using them on most errors, but they also say (emphasis mine): > Trying to call...
### Problem solved by the enhancement The speed of number serialization could probably be improved. ### Enhancement description Investigate usage of the libraries https://docs.rs/itoa and https://docs.rs/ryu for number serialization (see...
### Problem solved by the enhancement Currently the tests use the standard `assert` macros, e.g. `assert_eq`. This make it difficult to see the difference in longer strings and their use...
### Problem solved by the enhancement The writer returned by `JsonWriter::string_value_writer` only supports writing valid UTF-8 data. However, currently it is a `io::Write` and therefore allows writing arbitrary bytes, which...
### Problem solved by the enhancement The `Read` returned by `JsonReader::next_string_reader` will always provide valid UTF-8 bytes (assuming there is no bug in a `JsonReader` implementation). It might therefore be...