poem
poem copied to clipboard
How come `ToJSON` and `ParseFromJSON` exist?
Hey, as I look through more of the codebase, I so far see that every implementation of ToJSON
/ ParseFromJSON
just calls out to serde directly. I wonder why these traits exist, couldn't we just use Serialize
and Deserialize
?
In a similar sense, is serde the best candidate for json serialisation here? Are there maybe better performing/smaller/lighter crates to use for JSON?
Not using serde
to parse and serialize json.
As a note to this, we use it when mirroring and transforming internal API responses.
The separation lets us use the same model but with different serialization/deserialization behaviours between them. (Mostly with renaming)
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.