public void NodeTest()
        {
            var model = new glTFNode()
            {
                name   = "a",
                skin   = 0,
                camera = -1,
            };

            var json = model.ToJson();

            Assert.AreEqual(@"{""name"":""a"",""skin"":0}", json);
            Debug.Log(json);
        }
Beispiel #2
0
        public void NodeTest()
        {
            var model = new glTFNode()
            {
                name   = "a",
                skin   = 0,
                camera = -1,
            };

            var json = model.ToJson();

            Assert.AreEqual(@"{""name"":""a"",""skin"":0}", json);
            Debug.Log(json);

            var c = new JsonSchemaValidationContext("")
            {
                EnableDiagnosisForNotRequiredFields = true,
            };
            var json2 = JsonSchema.FromType <glTFNode>().Serialize(model, c);

            Assert.AreEqual(@"{""name"":""a"",""extras"":{}}", json2);
        }