json-rust
json-rust copied to clipboard
JSON implementation in Rust
The [`Key` struct](https://github.com/maciejhirsz/json-rust/blob/0775592d339002ab148185264970c2a6e30b5d37/src/object.rs#L52) is currently initialized in two phases. First it is created, like this: https://github.com/maciejhirsz/json-rust/blob/0775592d339002ab148185264970c2a6e30b5d37/src/object.rs#L71-L78 And only later it is [attached](https://github.com/maciejhirsz/json-rust/blob/0775592d339002ab148185264970c2a6e30b5d37/src/object.rs#L99) to its actual contents. Before the key is...
Hi, if I understand well, since #68 the order of an object entries is preserved during parsing. However the `Object::insert` function still always appends elements at the end. I believe...
If we provide a capacity too large, the program may crash. The code to replay the crash is as below. ```rust let capacity = 673957684733028; let _ = json::object::Object::with_capacity(capacity); ```...
Hi, For now you have two variants in `JsonValue` for strings (`Short` and `String`). This makes matching against json values tedious, since both variants are semantically equivalent. A better idea...
This a proposition of implementation of `IntoIter` for `Object` (#190). I also added an implementation of `From` for `String` to take ownership of the key, although the optimization for small...
Hi, It would be nice to be able to take ownership over the bindings of an object by implementing `IntoIterator` for `Object`. For now, bindings can only be borrowed using...
"Stable" JSON output libraries generally sort object keys lexically. While I understand from #178 that the default order is insertion order, it would be great to also have an option...
One thing that caught my attention right after reading the documentation is that trying to access a key that does not exist returns `null`. And thus this code works without...
Hello! First, thank you for this great crate! I believe that I found a bug when working with arrays. It seems that after trying to `take` a value with an...
Right now, `dump()` is not deterministic because the internal HashMap is not deterministic. It should be possible to ask `dump()` to sort object keys before outputting them. This makes debugging...