UniVRM/Core/Scripts/Format/GLTFJsonFormatter.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

36 lines
803 B
C#

using System.Collections.Generic;
using UniJSON;
namespace UniGLTF
{
public class GLTFJsonFormatter: UniJSON.JsonFormatter
{
public void GLTFValue(JsonSerializableBase s)
{
CommaCheck();
Store.Write(s.ToJson());
}
public void GLTFValue<T>(IEnumerable<T> values) where T : JsonSerializableBase
{
BeginList();
foreach (var value in values)
{
GLTFValue(value);
}
EndList();
}
public void GLTFValue(List<string> values)
{
BeginList();
foreach (var value in values)
{
this.Value(value);
}
EndList();
}
}
}