|
|
@@ -488,7 +488,7 @@ namespace SharpGLTF.IO
|
|
|
var ntype = Nullable.GetUnderlyingType(vtype);
|
|
|
if (ntype != null) vtype = ntype;
|
|
|
|
|
|
- // known types
|
|
|
+ // known types
|
|
|
|
|
|
if (vtype == typeof(String)) { value = reader.AsString(); return true; }
|
|
|
if (vtype == typeof(Boolean)) { value = reader.AsBoolean(); return true; }
|
|
|
@@ -551,6 +551,12 @@ namespace SharpGLTF.IO
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ if (typeof(System.Text.Json.Nodes.JsonNode).IsAssignableFrom(vtype))
|
|
|
+ {
|
|
|
+ value = System.Text.Json.Nodes.JsonNode.Parse(ref reader);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
if (typeof(JsonSerializable).IsAssignableFrom(vtype))
|
|
|
{
|
|
|
var item = Activator.CreateInstance(vtype, true) as JsonSerializable;
|