json
json copied to clipboard
Document features
There are some cargo features that appear to modify the behavior of the crate, but it is not clear what exactly they do. It would be useful to have an overview of the following features in the crate-level docs:
- preserve_order
- raw_value
- unbounded_depth
- arbitrary_precision
- float_roundtrip
I found docs in https://github.com/serde-rs/json/blob/master/Cargo.toml but these can be made easier to find :)
Perhaps the docs could point to the Cargo.toml? The Cargo.toml contains the ground truth - the feature names, the inter-feature dependencies, and the feature docs, all in one place. If that information was mirrored in another place, every feature change would need to be updated in two places and there would be a high risk of drifting out of sync
(I wish rustdoc could extract doc comments on features inside Cargo.toml)
https://docs.rs/document-features/latest/document_features/ can extract comments from Cargo.toml