holopy3/Assets/UniGLTF/Core/Scripts/Extensions/JsonParserExtensions.cs
Lena Biresch 490ef558ef CleanUp
2021-01-28 13:07:52 +01:00

19 lines
421 B
C#

using System.Linq;
using UnityEngine;
using System.Collections.Generic;
namespace UniJSON
{
public static class JsonParserExtensions
{
public static List<T> DeserializeList<T>(this JsonNode jsonList)
{
return jsonList.ArrayItems.Select(x => {
return JsonUtility.FromJson<T>(x.Value.Segment.ToString());
}).ToList();
}
}
}