8 releases

0.2.1 Mar 21, 2024
0.2.0 Mar 8, 2024
0.1.8 Oct 11, 2023
0.1.7 Aug 24, 2023
0.1.4 Mar 8, 2022

#144 in Encoding

Download history 101/week @ 2024-01-03 156/week @ 2024-01-10 139/week @ 2024-01-17 2597/week @ 2024-01-24 963/week @ 2024-01-31 975/week @ 2024-02-07 1310/week @ 2024-02-14 2719/week @ 2024-02-21 2022/week @ 2024-02-28 1669/week @ 2024-03-06 1422/week @ 2024-03-13 1538/week @ 2024-03-20 1250/week @ 2024-03-27 1254/week @ 2024-04-03 1980/week @ 2024-04-10 1410/week @ 2024-04-17

6,099 downloads per month

MIT/Apache

560KB
13K SLoC

serde_json_lenient   Build Status Latest Version Rustc Version 1.36+

This is a lenient JSON parser forked from the serde_json crate that is that is designed to parse JSON written by humans (e.g., JSON config files). This means that it supports:

  • /* and // style comments.
  • Trailing commas for object and array literals.
  • \v and \xDD literal escapes (for vertical tab and two-digit hexadecimal characters)
  • [planned] Unquoted object keys (precise spec TBD).

Each such feature is switchable.

Earlier work to make serde_json more lenient was performed by Michael Bolin as the crate serde_jsonrc. This crate builds on his work and updates to more recent [serde_json].

Why not make serde_json more lenient?

The maintainer wanted to keep the scope of serde_json limited to strict JSON, so we respectfully agreed that forking was the way to go.

License

Because serde_json_lenient is a fork of serde_json, it maintains the original licence, which means it is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in serde_json_lenient by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~155–600KB
~12K SLoC