Cargo Features
[dependencies]
rjship = { version = "0.3.3", default-features = false, features = ["std", "alloc", "rc", "preserve_order", "arbitrary_precision", "unbounded_depth", "float_roundtrip"] }
- default = std
-
The
std
feature is set by default wheneverrjship
is added without
somewhere in the dependency tree.default-features = false - std default = alloc
- alloc std
-
Enables alloc of serde_json
serde_json:
Provide integration for heap-allocated collections without depending on the rest of the Rust standard library. NOTE: Disabling both
std
andalloc
features is not supported yet. - rc
-
serde:
Opt into impls for Rc<T> and Arc<T>. Serializing and deserializing these types does not preserve identity and may result in multiple copies of the same data.
Be sure that this is what you want before enabling this feature. - preserve_order
-
Enables preserve_order of serde_json
serde_json:
Make serde_json::Map use a representation which maintains insertion order.
This allows data to be read into a Value and written back to a JSON string while preserving the order of map keys in the input. - arbitrary_precision
-
Enables arbitrary_precision of serde_json
serde_json:
Use an arbitrary precision number representation for serde_json::Number. This allows JSON numbers of arbitrary size/precision to be read into a Number and written back to a JSON string without loss of precision.
Unlike float_roundtrip, this feature makes JSON -> serde_json::Number -> JSON produce output identical to the input. - unbounded_depth
-
Enables unbounded_depth of serde_json
serde_json:
Provide a method disable_recursion_limit to parse arbitrarily deep JSON structures without any consideration for overflowing the stack. When using this feature, you will want to provide some other way to protect against stack overflows, such as by wrapping your Deserializer in the dynamically growing stack adapter provided by the serde_stacker crate. Additionally you will need to be careful around other recursive operations on the parsed result which may overflow the stack after deserialization has completed, including, but not limited to, Display and Debug and Drop impls.
- float_roundtrip
-
Enables float_roundtrip of serde_json
serde_json:
Use sufficient precision when parsing fixed precision floats from JSON to ensure that they maintain accuracy when round-tripped through JSON. This comes at an approximately 2x performance cost for parsing floats compared to the default best-effort precision.
Unlike arbitrary_precision, this feature makes f64 -> JSON -> f64 produce output identical to the input.
RjShip has 8 features without comments.