forked from rojo-rbx/rojo
Make JSON models less strict
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Current master
|
## Current master
|
||||||
* Fixed warning when renaming or removing files that would sometimes corrupt the instance cache (#72)
|
* Fixed warning when renaming or removing files that would sometimes corrupt the instance cache (#72)
|
||||||
|
* JSON models are no longer as strict -- `Children` and `Properties` are now optional.
|
||||||
|
|
||||||
## 0.4.8 (May 26, 2018)
|
## 0.4.8 (May 26, 2018)
|
||||||
* Hotfix to prevent errors from being thrown when objects managed by Rojo are deleted
|
* Hotfix to prevent errors from being thrown when objects managed by Rojo are deleted
|
||||||
|
|||||||
@@ -6,7 +6,11 @@ use std::collections::HashMap;
|
|||||||
pub struct RbxInstance {
|
pub struct RbxInstance {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub class_name: String,
|
pub class_name: String,
|
||||||
|
|
||||||
|
#[serde(default = "Vec::new")]
|
||||||
pub children: Vec<RbxInstance>,
|
pub children: Vec<RbxInstance>,
|
||||||
|
|
||||||
|
#[serde(default = "HashMap::new")]
|
||||||
pub properties: HashMap<String, RbxValue>,
|
pub properties: HashMap<String, RbxValue>,
|
||||||
|
|
||||||
/// The route that this instance was generated from, if there was one.
|
/// The route that this instance was generated from, if there was one.
|
||||||
|
|||||||
@@ -4,14 +4,11 @@
|
|||||||
"Children": [
|
"Children": [
|
||||||
{
|
{
|
||||||
"Name": "Some Part",
|
"Name": "Some Part",
|
||||||
"ClassName": "Part",
|
"ClassName": "Part"
|
||||||
"Children": [],
|
|
||||||
"Properties": {}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "Some StringValue",
|
"Name": "Some StringValue",
|
||||||
"ClassName": "StringValue",
|
"ClassName": "StringValue",
|
||||||
"Children": [],
|
|
||||||
"Properties": {
|
"Properties": {
|
||||||
"Value": {
|
"Value": {
|
||||||
"Type": "String",
|
"Type": "String",
|
||||||
@@ -19,6 +16,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"Properties": {}
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user