mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-21 05:06:29 +00:00
Make JSON models less strict
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
## Current master
|
||||
* 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)
|
||||
* 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 name: String,
|
||||
pub class_name: String,
|
||||
|
||||
#[serde(default = "Vec::new")]
|
||||
pub children: Vec<RbxInstance>,
|
||||
|
||||
#[serde(default = "HashMap::new")]
|
||||
pub properties: HashMap<String, RbxValue>,
|
||||
|
||||
/// The route that this instance was generated from, if there was one.
|
||||
|
||||
@@ -4,14 +4,11 @@
|
||||
"Children": [
|
||||
{
|
||||
"Name": "Some Part",
|
||||
"ClassName": "Part",
|
||||
"Children": [],
|
||||
"Properties": {}
|
||||
"ClassName": "Part"
|
||||
},
|
||||
{
|
||||
"Name": "Some StringValue",
|
||||
"ClassName": "StringValue",
|
||||
"Children": [],
|
||||
"Properties": {
|
||||
"Value": {
|
||||
"Type": "String",
|
||||
@@ -19,6 +16,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"Properties": {}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user