UniVRM/Core/Scripts/Extensions/JsonParserExtensions.cs
ousttrue 2a19c831f8 Squashed 'UniGLTF/' content from commit 690847a
git-subtree-dir: UniGLTF
git-subtree-split: 690847a1a5a0bd3df55187e1f1cb6f338c09225b
2018-12-28 19:53:19 +09:00

20 lines
471 B
C#

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