12 Commits

Author SHA1 Message Date
Stephen Chung
b2e4efd872 Fine tune serde. 2022-11-22 15:38:16 +08:00
Stephen Chung
d6b0f99781 Refactor. 2022-10-10 16:46:35 +08:00
Stephen Chung
8d1310c0f3 Make Scope serializable. 2022-09-26 18:14:45 +08:00
Stephen Chung
ce56c43bc0 Refactor serde impl. 2022-09-25 16:20:36 +08:00
Geoffroy Couprie
f2b5566c0b use smartstring's deserializer to support non borrowed strings
The map visitor for Dynamic was expecting a &str for the key, but the
serde_json deserializer internally uses a Cow string, which can be
Borrowed or Owned. In the case of Owned, the serde_json key deserializer
is calling visit_string on the Visitor, which for &str will result in
the error:
Error("invalid type: string \"a\", expected a borrowed string", line: 0,
column: 0)

smartstring actually has its own Visitor implementation that handles
both cases, so we can use it instead of an explicit conversion.
2022-05-23 16:40:49 +02:00
Stephen Chung
2a7a648429 Reduce feature gates. 2021-12-06 20:52:47 +08:00
Stephen Chung
6510b617fe Reduce usage of Default::default() 2021-09-11 19:40:40 +08:00
Stephen Chung
29133cf973 Satisfy clippy. 2021-07-26 22:22:27 +08:00
Stephen Chung
01f0cc028b Use no-std-compat to build no-std. 2021-04-17 15:15:54 +08:00
Stephen Chung
98afb2e7d6 Fix feature builds. 2021-03-31 10:16:38 +08:00
Stephen Chung
3a6e6848fd Fix serde build. 2021-03-29 18:46:32 +08:00
Stephen Chung
b789c319e7 Rename serde_impl to serde. 2021-02-19 15:17:14 +08:00