prataprc / jsondata Goto Github PK
View Code? Open in Web Editor NEWJSON processor
Home Page: https://docs.rs/jsondata
License: MIT License
JSON processor
Home Page: https://docs.rs/jsondata
License: MIT License
TryFrom and TryInto are right now unstable. Once they have stabilised implement them for bool, i128, f64, String, Vec<Json
>, Vec<Property
> types.
For Travis continuous integration, QuickCheck is a nightly package, hence it can be tested only in nightly.
When JSON is the document format for databases, there shall always be some
need to define PartialOrd and Ord for JSON formated values. More specifically
we may need to figure out the following details -
Following list of operations can be implemented.
In case you need jsondata to be part of a proprietary distribution or to be part of a different license agreement, please post your request here or contact the author directly.
It looks like the following feature prevents the crate from compiling on stable Rust.
#![feature(total_cmp)]
Is it possible to work around this feature in order to get the crate to compile on stable? If not, is there an expected time frame for when this feature might make it into stable? I would really like to use the crate, but the dependence on nightly could become an issue.
From https://users.rust-lang.org/t/sort-order-for-json/24166/3
Floats are serialized to JSON5 using {:e}
formatting, which renders infinity as inf
/-inf
instead of Infinity
/-Infinity
.
Read API should begin with to_
or into_
or as_
Unicode specification for sorting string has this to say:
Because collation varies by language and not just by script, it is not possible to arrange the encoding for characters so that simple binary string comparison produces the desired collation order for all languages. Because multi-level sorting is a requirement, it is not even possible to arrange the encoding for characters so that simple binary string comparison produces the desired collation order for any particular language.
Note that the current implementation of Ord on JSON string simply does a byte-by-byte comparison.
Would be nice to add the following badges.
Json-data serialization can be bench marked and compared with other serialization via
https://github.com/djkoloski/rust_serialization_benchmark
Values in jsondata::Json should not change in its hash value for any given hashing algorithm. Also the serialized form of jsondata::Json should not affect its hash value for any give hashing algorithm.
List of common hashing algorithm:
fasthash::city
fasthash::murmur3
SHA1
Parse an incoming stream of JSON text. This can have separate
implementation from parsing non-streaming JSON text to avoid performance
overheads for the later case.
JSON5 extends JSON specification.
Refer: Full JSON5 specification
So that application can handle returned error values from publicly exposed API.
Benchmark JSON operations like:
JSON Strings can be unicode encoded and parsing them can be costly: For example
for r#""汉语 / 漢語; Hàn\b \tyǔ ""#
bench_string: 771 ns/iter (+/- 213)
By not supporting unicode encoded string, we can improve the performance of JSON deserialisation.
Right now parse_string()
handles string parsing for JSON. Implement parse_ascii_string()
as alternate feature.
Total ordering is complex for floating point numbers. Adding to that in JSON, due to mixed type of integer and floating-point, total ordering need to be worked out across both integers and floats.
A detailed description for total ordering is covered here
Also there is a discussion thread in users.rust-lang.org.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.