diff --git a/Scripts/Format/Editor/VRMVersionMenu.cs b/Scripts/Format/Editor/VRMVersionMenu.cs index 120cc4f0a..a58061853 100644 --- a/Scripts/Format/Editor/VRMVersionMenu.cs +++ b/Scripts/Format/Editor/VRMVersionMenu.cs @@ -45,7 +45,7 @@ namespace VRM AssetDatabase.Refresh(); } - static string GetTitle(JsonNode node) + static string GetTitle(ListTreeNode node) { try { @@ -61,7 +61,7 @@ namespace VRM return ""; } - static void TraverseItem(JsonNode node, JsonFormatter f, UnityPath dir) + static void TraverseItem(ListTreeNode node, JsonFormatter f, UnityPath dir) { var title = GetTitle(node); if (string.IsNullOrEmpty(title)) @@ -82,7 +82,7 @@ namespace VRM var subFormatter = new JsonFormatter(4); subFormatter.BeginMap(); - foreach (var _kv in node.ObjectItemsRaw) + foreach (var _kv in node.ObjectItems()) { subFormatter.Key(_kv.Key.GetUtf8String()); Traverse(_kv.Value, subFormatter, dir); @@ -96,12 +96,12 @@ namespace VRM } } - static void Traverse(JsonNode node, JsonFormatter f, UnityPath dir) + static void Traverse(ListTreeNode node, JsonFormatter f, UnityPath dir) { if (node.IsArray()) { f.BeginList(); - foreach (var x in node.ArrayItemsRaw) + foreach (var x in node.ArrayItems()) { TraverseItem(x, f, dir); } @@ -110,7 +110,7 @@ namespace VRM else if (node.IsMap()) { f.BeginMap(); - foreach (var kv in node.ObjectItemsRaw) + foreach (var kv in node.ObjectItems()) { f.Key(kv.Key.GetUtf8String()); TraverseItem(kv.Value, f, dir); @@ -123,7 +123,7 @@ namespace VRM } } - static UnityPath SplitAndWriteJson(JsonNode parsed, UnityPath dir) + static UnityPath SplitAndWriteJson(ListTreeNode parsed, UnityPath dir) { var f = new JsonFormatter(4); Traverse(parsed, f, dir); diff --git a/Scripts/Format/glTF_VRM_Material.cs b/Scripts/Format/glTF_VRM_Material.cs index f5079be1e..90d9daa17 100644 --- a/Scripts/Format/glTF_VRM_Material.cs +++ b/Scripts/Format/glTF_VRM_Material.cs @@ -94,25 +94,25 @@ namespace VRM static Utf8String s_tagMap = Utf8String.From("tagMap"); static Utf8String s_textureProperties = Utf8String.From("textureProperties"); - public static List Parse(JsonNode json) + public static List Parse(ListTreeNode json) { var materials = json.DeserializeList(); - var jsonItems = json.ArrayItemsRaw.ToArray(); + var jsonItems = json.ArrayItems().ToArray(); for (int i = 0; i < materials.Count; ++i) { materials[i].floatProperties = - jsonItems[i][s_floatProperties].ObjectItems.ToDictionary(x => x.Key.ToString(), x => x.Value.GetSingle()); + jsonItems[i][s_floatProperties].ObjectItems().ToDictionary(x => x.Key.GetString(), x => x.Value.GetSingle()); materials[i].vectorProperties = - jsonItems[i][s_vectorProperties].ObjectItems.ToDictionary(x => x.Key.ToString(), x => + jsonItems[i][s_vectorProperties].ObjectItems().ToDictionary(x => x.Key.GetString(), x => { - return x.Value.ArrayItems.Select(y => y.GetSingle()).ToArray(); + return x.Value.ArrayItems().Select(y => y.GetSingle()).ToArray(); }); materials[i].keywordMap = - jsonItems[i][s_keywordMap].ObjectItems.ToDictionary(x => x.Key.ToString(), x => x.Value.GetBoolean()); + jsonItems[i][s_keywordMap].ObjectItems().ToDictionary(x => x.Key.GetString(), x => x.Value.GetBoolean()); materials[i].tagMap = - jsonItems[i][s_tagMap].ObjectItems.ToDictionary(x => x.Key.ToString(), x => x.Value.GetString()); + jsonItems[i][s_tagMap].ObjectItems().ToDictionary(x => x.Key.GetString(), x => x.Value.GetString()); materials[i].textureProperties = - jsonItems[i][s_textureProperties].ObjectItems.ToDictionary(x => x.Key.ToString(), x => x.Value.GetInt32()); + jsonItems[i][s_textureProperties].ObjectItems().ToDictionary(x => x.Key.GetString(), x => x.Value.GetInt32()); } return materials; } diff --git a/UniGLTF b/UniGLTF index b1081eecf..e7618ebfb 160000 --- a/UniGLTF +++ b/UniGLTF @@ -1 +1 @@ -Subproject commit b1081eecf8c8e34869316619e64482bbd2848f9a +Subproject commit e7618ebfb1fe91454ac864d38f7c85542b910b09