The use of Serde's [De]serialize saved us lots of time, but at this stage, it:
causes us to consume and produce unreadable JSON;
produces unusable error messages.
This patch fully reimplements our (de)serialization to introduce:
a trait ToJSON and a method to_json, to serialize values;
a trait Parser and a method parse (and a few others) to deserialize values;
much clearer exceptions;
tests and documentation.
For the moment, we do not remove Serde's [De]serialize, as it is still
used by the Simulator and possibly other stuff, but it is most likely
on its way out.
The use of Serde's [De]serialize saved us lots of time, but at this stage, it:
This patch fully reimplements our (de)serialization to introduce:
ToJSON
and a methodto_json
, to serialize values;Parser
and a methodparse
(and a few others) to deserialize values;For the moment, we do not remove Serde's [De]serialize, as it is still used by the Simulator and possibly other stuff, but it is most likely on its way out.