json-rust icon indicating copy to clipboard operation
json-rust copied to clipboard

`stringify` and `stringify_pretty` consume a `JsonValue`

Open bsdinis opened this issue 4 years ago • 1 comments

I see no reason why they cannot take an immutable reference to a JsonValue.

This would probably save a lot of cloneing.

bsdinis avatar Feb 27 '21 03:02 bsdinis

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()

jurosic avatar Mar 27 '23 15:03 jurosic