Firstborn/Library/PackageCache/com.unity.shadergraph@12.1.8/Editor/Serialization/MultiJson.cs
Schaken-Mods b486678290 Library -Artifacts
Library -Artifacts
2023-03-28 12:24:16 -05:00

29 lines
854 B
C#

using System;
using UnityEngine;
namespace UnityEditor.ShaderGraph.Serialization
{
static class MultiJson
{
public static void Deserialize<T>(T objectToOverwrite, string json, JsonObject referenceRoot = null, bool rewriteIds = false) where T : JsonObject
{
var entries = MultiJsonInternal.Parse(json);
if (referenceRoot != null)
{
MultiJsonInternal.PopulateValueMap(referenceRoot);
}
MultiJsonInternal.Deserialize(objectToOverwrite, entries, rewriteIds);
}
public static string Serialize(JsonObject mainObject)
{
return MultiJsonInternal.Serialize(mainObject);
}
public static Type ParseType(string typeString)
{
return MultiJsonInternal.ParseType(typeString);
}
}
}