public static string ToJson(this glTF_VRM_MaterialValueBind self) { var f = new JsonFormatter(); VRMSerializer.Serialize_vrm_blendShapeMaster_blendShapeGroups__materialValues_ITEM(f, self); return(f.ToString()); }
public static glTF_VRM_MaterialValueBind Deserialize_vrm_blendShapeMaster_blendShapeGroups__materialValues_LIST(ListTreeNode <JsonValue> parsed) { var value = new glTF_VRM_MaterialValueBind(); foreach (var kv in parsed.ObjectItems()) { var key = kv.Key.GetString(); if (key == "materialName") { value.materialName = kv.Value.GetString(); continue; } if (key == "propertyName") { value.propertyName = kv.Value.GetString(); continue; } if (key == "targetValue") { value.targetValue = Deserialize_vrm_blendShapeMaster_blendShapeGroups__materialValues__targetValue(kv.Value); continue; } } return(value); }
public void MaterialValueBindTest() { var model = new glTF_VRM_MaterialValueBind(); var json = model.ToJson(); Assert.AreEqual(@"{}", json); Debug.Log(json); }
public void MaterialValueBindTest() { var model = new glTF_VRM_MaterialValueBind(); var json = model.ToJson(); Assert.AreEqual(@"{}", json); Debug.Log(json); var c = new JsonSchemaValidationContext("") { EnableDiagnosisForNotRequiredFields = true, }; var json2 = JsonSchema.FromType <glTF_VRM_MaterialValueBind>().Serialize(model, c); Assert.AreEqual(json, json2); }
public static void Serialize_vrm_blendShapeMaster_blendShapeGroups__materialValues_ITEM(JsonFormatter f, glTF_VRM_MaterialValueBind value) { f.BeginMap(); if (!string.IsNullOrEmpty(value.materialName)) { f.Key("materialName"); f.Value(value.materialName); } if (!string.IsNullOrEmpty(value.propertyName)) { f.Key("propertyName"); f.Value(value.propertyName); } if (value.targetValue != null && value.targetValue.Length >= 0) { f.Key("targetValue"); Serialize_vrm_blendShapeMaster_blendShapeGroups__materialValues__targetValue(f, value.targetValue); } f.EndMap(); }