json-rust
json-rust copied to clipboard
JSON implementation in Rust
I have been waiting for the major update stated in #181 : > *If your strings are short they will be inlined on stack and use JsonValue::Short instead of JsonValue::String.*...
I need to organize `JsonValue`s into a `HashSet` however I just noticed that `JsonValue` does not implement the `Hash` trait. Is there a reason for that?
This adds JsonValue::as_object() and JsonValue::as_array() methods. This provides parity with the as_u32, as_str, etc. methods. It simplifies code that deals with objects and arrays directly, rather than using serde for...
Looking around it seems like serde_json memory overhead is significant I wonder how good is json-rust compared to it. Also it seems like there are other libraries that are trying...
Error: ```rs error[E0277]: the type `JsonValue` cannot be indexed by `u32` --> src/lib.rs:65:12 | 65 | while !parsed["functions"][c].is_null() { | ^^^^^^^^^^^^^^^^^^^^^^ `JsonValue` cannot be indexed by `u32` | = help:...
This patch reduces the number of instructions performed and should boost performance.
I tried to remove a key and assign new key didnt work. Any idea ? let mut parsed = json::parse(&data).unwrap(); let var1 = parsed.remove("test").to_string(); parsed["cdate"] = Utc::now().to_string().into();
I see no reason why they cannot take an immutable reference to a `JsonValue`. This would probably save a lot of `clone`ing.
```Rust get_cached_power(754645927552678136); get_cached_power(5932085134177075026); // and similar overflows ``` Error message: `thread 'main' panicked at 'index out of bounds: the len is 87 but the index is 5932085134177075026', //json-rust/src/util/diyfp.rs:226:16`