Adding IndexMap under feature flag preserve_order (#36)

This commit is contained in:
Ralph Bisschops 2020-06-07 23:24:36 +02:00 committed by GitHub
parent a02947462d
commit a618a90eb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 6 deletions

View file

@ -19,7 +19,7 @@ serde_json = "1.0"
dyn-clone = "1.0"
chrono = { version = "0.4", default-features = false, optional = true }
indexmap = { version = "1.2", optional = true }
indexmap = { version = "1.2", features=["serde-1"], optional = true }
either = { version = "1.3", default-features = false, optional = true }
uuid = { version = "0.8", default-features = false, optional = true }
smallvec = { version = "1.0", optional = true }
@ -34,6 +34,11 @@ default = ["derive"]
derive = ["schemars_derive"]
# Use a different representation for the map type of Schemars.
# 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.
preserve_order = ["indexmap"]
impl_json_schema = ["derive"]
# derive_json_schema will be removed in a later version
derive_json_schema = ["impl_json_schema"]