public static void SerializeToNode() { MyPoco obj = MyPoco.Create(); JsonNode dom = JsonSerializer.SerializeToNode(obj); JsonNode stringProp = dom["StringProp"]; Assert.True(stringProp is JsonValue); Assert.Equal("Hello", stringProp.AsValue().GetValue <string>()); JsonNode arrayProp = dom["IntArrayProp"]; Assert.IsType <JsonArray>(arrayProp); Assert.Equal(1, arrayProp[0].AsValue().GetValue <int>()); Assert.Equal(2, arrayProp[1].AsValue().GetValue <int>()); }