Adding IndexMap
under feature flag preserve_order
(#36)
This commit is contained in:
parent
a02947462d
commit
a618a90eb4
3 changed files with 27 additions and 6 deletions
|
@ -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"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue