public void ReadMany_ObjectExtraValueAfterClose_DeserializesStreamOfObject() { // input from fail10.json in test suite at http://www.json.org/JSON_checker/ var input = new StringReader(@"{""Extra value after close"": true} ""misplaced quoted value"""); var reader = new JsonReader(new DataReaderSettings()); var enumerator = reader.ReadMany(input).GetEnumerator(); Assert.True(enumerator.MoveNext()); Assert.Equal(new Dictionary <string, object> { { "Extra value after close", true } }, enumerator.Current, false); Assert.True(enumerator.MoveNext()); Assert.Equal( "misplaced quoted value", enumerator.Current); Assert.False(enumerator.MoveNext()); }
public void ReadMany_ObjectExtraValueAfterClose_DeserializesStreamOfObject() { // input from fail10.json in test suite at http://www.json.org/JSON_checker/ var input = new StringReader(@"{""Extra value after close"": true} ""misplaced quoted value"""); var reader = new JsonReader(new DataReaderSettings()); var enumerator = reader.ReadMany(input).GetEnumerator(); Assert.True(enumerator.MoveNext()); Assert.Equal(new Dictionary<string, object> { { "Extra value after close", true } }, enumerator.Current, false); Assert.True(enumerator.MoveNext()); Assert.Equal( "misplaced quoted value", enumerator.Current); Assert.False(enumerator.MoveNext()); }