json-rust
json-rust copied to clipboard
`stringify` and `stringify_pretty` consume a `JsonValue`
I see no reason why they cannot take an immutable reference to a JsonValue.
This would probably save a lot of cloneing.
I noticed this too, i looked into the code and it seems it actually just calls the .pretty() method on the JsonValue object, so instad of using stringify_pretty you can use .pretty()