Open rooney opened 2 months ago
Is this not an obvious breaking change that would require a serde_json 2.0?
Is this not an obvious breaking change that would require a serde_json 2.0?
Hmm yes, any other parts that should also been updated? (Apologies if these should be obvious, still learning)
@GnomedDev Redone the fix so now from_value
accepts both &Value
and Value
(so no breaking changes, but maybe the latter can be deprecated?). New test for the &Value
is on doctest (should I add more?)
If the function needs ownership, you should pass by value. If the function only needs a reference, you should pass by reference.
-- https://stackoverflow.com/a/64814149/342293
from_value
doesn't need to own its parameter, so it should use pass-by-reference.