Since this appears to be something of a de facto convention, serde_json5 should follow it. However, serde_json5::from_reader has the following signature:
This is “backwards”, and also needlessly prevents passing the reader by value (which means it has to be declared mut even if you intend for from_reader to consume it). serde_json5 should adopt the more standard signature.
serde_json::from_reader
has the following signature:This matches the signature of
serde_yaml::from_reader
:Since this appears to be something of a de facto convention,
serde_json5
should follow it. However,serde_json5::from_reader
has the following signature:This is “backwards”, and also needlessly prevents passing the reader by value (which means it has to be declared
mut
even if you intend forfrom_reader
to consume it).serde_json5
should adopt the more standard signature.