1[package]
2name = "ylong_json"
3version = "1.0.0"
4edition = "2021"
5description = "A JSON serialization file format"
6#readme = "README.md"
7license = "Apache-2.0"
8repository = "https://gitee.com/openharmony-sig/commonlibrary_rust_ylong_json"
9keywords = ["ylong", "json", "serialization", "deserialization"]
10
11# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
12
13[lib]
14name = "ylong_json"
15crate-type = ["cdylib", "staticlib", "lib"]
16
17[features]
18default = ["btree_object", "vec_array"] # Object 默认使用 Btree 结构,Array 默认使用 Vec 结构。
19c_adapter = ["libc"]    # 使用 C 封装层接口
20list_array = []         # Array 底层使用 LinkedList。在 Array 的平均子节点数较少(约小于 15 个)、查找数量较少时,性能较好。
21vec_array = []          # Array 底层使用 Vec。在 Array 的平均子节点数较多(约大于 15 个)、查找数量较多时,性能较好。
22list_object = []        # Object 底层使用 LinkedList。在 Object 的平均子节点数较少(约小于 15 个)、查找数量较少时,性能较好。
23vec_object = []         # Object 底层使用 Vec。在 Object 的平均子节点数中等(约大于 15 个,小于 1024 个)、查找数量较少时,性能较好。
24btree_object = []       # Object 底层使用 Btree。在 Object 的平均子节点数较多(约大于 1024 个)、查找数量较多时,性能较好。
25ascii_only = []         # 仅使用 ASCII 字符,正常解析 unicode 字符,但超出 ASCII 的 UTF-8 字符在输出时保持不变。
26
27[dependencies]
28libc = { version = "0.2.134", optional = true }
29serde = { version = "1.0.136", features = ["derive"] }
30
31[dev-dependencies]
32serde_json = "1.0.74"
33
34[[test]]
35name = "sdv_adapter_test"
36path = "./tests/sdv_adapter_test.rs"
37required-features = ["c_adapter"]
38
39[[test]]
40name = "ylong_json_sdv_test"
41path = "./tests/ylong_json_sdv_test.rs"
42required-features = []