|
2 | 2 | //!
|
3 | 3 | //! https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata
|
4 | 4 |
|
| 5 | +use indexmap::IndexMap; |
5 | 6 | use serde::{Deserialize, Serialize};
|
6 | 7 | use serde_json::Value;
|
7 | 8 | use std::collections::HashMap;
|
@@ -81,8 +82,8 @@ pub struct Class {
|
81 | 82 | pub description: Option<String>,
|
82 | 83 |
|
83 | 84 | /// A dictionary, where each key is a property ID and each value is an object defining the property.
|
84 |
| - #[serde(default, skip_serializing_if = "HashMap::is_empty")] |
85 |
| - pub properties: HashMap<String, ClassProperty>, |
| 85 | + #[serde(default, skip_serializing_if = "IndexMap::is_empty")] |
| 86 | + pub properties: IndexMap<String, ClassProperty>, |
86 | 87 |
|
87 | 88 | /// JSON object with extension-specific objects.
|
88 | 89 | #[serde(skip_serializing_if = "Option::is_none")]
|
@@ -288,8 +289,8 @@ pub struct PropertyTable {
|
288 | 289 | pub count: u32,
|
289 | 290 |
|
290 | 291 | /// A dictionary, where each key corresponds to a property ID and each value is an object describing where property values are stored.
|
291 |
| - #[serde(default, skip_serializing_if = "HashMap::is_empty")] |
292 |
| - pub properties: HashMap<String, PropertyTableProperty>, |
| 292 | + #[serde(default, skip_serializing_if = "IndexMap::is_empty")] |
| 293 | + pub properties: IndexMap<String, PropertyTableProperty>, |
293 | 294 |
|
294 | 295 | /// JSON object with extension-specific objects.
|
295 | 296 | #[serde(skip_serializing_if = "Option::is_none")]
|
|
0 commit comments