Git Product home page Git Product logo

serde_json_lenient's Introduction

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.

serde_json_lenient's People

Contributors

adetaylor avatar bennofs avatar bolinfest avatar chanced avatar deankarn avatar dflemstr avatar djmitche avatar dtolnay avatar erickt avatar frewsxcv avatar homu avatar imp avatar japaric avatar jplatte avatar jwilm avatar killercup avatar laktak avatar little-arhat avatar lnicola avatar lucacasonato avatar ndmitchell avatar nox avatar oli-obk avatar osiewicz avatar overdrivenpotato avatar rufflewind avatar s-panferov avatar srijs avatar vegai avatar xanewok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

serde_json_lenient's Issues

Nightly prohibits duplicate imports to the prelude

Lots of errors like

warning: the item `ToOwned` is imported redundantly
 --> src/value/ser.rs:4:5
  |
4 | use alloc::borrow::ToOwned;
  |     ^^^^^^^^^^^^^^^^^^^^^^
 --> /rustc/3406ada96f8e16e49e947a91db3eba0db45245fa/library/std/src/prelude/mod.rs:125:13
  |
  = note: the item `ToOwned` is already defined here

These can be reproduced with

RUSTFLAGS=-Dwarnings cargo +nightly check --locked

I assume these uses are specifically addressing alloc, and not std. I'm not sure what the best fix is -- can we assume they arei n the prelude, or will that fail in nostd builds?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.