Ei kuvausta
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MultiJson.cs 854B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using UnityEngine;
  3. namespace UnityEditor.ShaderGraph.Serialization
  4. {
  5. static class MultiJson
  6. {
  7. public static void Deserialize<T>(T objectToOverwrite, string json, JsonObject referenceRoot = null, bool rewriteIds = false) where T : JsonObject
  8. {
  9. var entries = MultiJsonInternal.Parse(json);
  10. if (referenceRoot != null)
  11. {
  12. MultiJsonInternal.PopulateValueMap(referenceRoot);
  13. }
  14. MultiJsonInternal.Deserialize(objectToOverwrite, entries, rewriteIds);
  15. }
  16. public static string Serialize(JsonObject mainObject)
  17. {
  18. return MultiJsonInternal.Serialize(mainObject);
  19. }
  20. public static Type ParseType(string typeString)
  21. {
  22. return MultiJsonInternal.ParseType(typeString);
  23. }
  24. }
  25. }