json icon indicating copy to clipboard operation
json copied to clipboard

Value could implement `From<&String>`

Open Ten0 opened this issue 5 years ago • 1 comments

... in the same way it implements From<&str>. This would be useful when writing generic code on T: Into<serde_json::Value>.

Ten0 avatar Jan 21 '20 15:01 Ten0

Maybe impl<T: AsRef<str>> for Value ? This way it can accept anything that can be referenced as string slice (including, String and str).

acanthite1855 avatar Apr 06 '20 16:04 acanthite1855