We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a35f50f commit 3180fefCopy full SHA for 3180fef
nanoFramework.Json.Test/JsonSerializerOptionsTests.cs
@@ -119,6 +119,19 @@ public void Can_serialize_and_deserialize_arrays_of_class_objects()
119
OutputHelper.WriteLine("");
120
}
121
122
+ [TestMethod]
123
+ public void Can_deserialize_string_starting_with_unicode_escape()
124
+ {
125
+ // escaped JSON: "Product":"\u00315 litres" -> Product = "5 liters"
126
+ var json = "{\"Product\":\"\\u00315 litres\",\"Count\":10}";
127
+
128
+ var item = JsonConvert.DeserializeObject(json, typeof(Item)) as Item;
129
130
+ Assert.NotNull(item);
131
+ Assert.Equal("5 liters", item.Product);
132
+ Assert.Equal(10, item.Count);
133
+ }
134
135
[TestMethod]
136
public void Can_serialize_and_deserialize_arrays_of_class_objects_when_array_items_may_be_null()
137
{
0 commit comments