You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 16, 2022. It is now read-only.
When I am trying to deserialize the following JSON : {"Body":[123,34,72,105,115,116,111,114,121,83,97,109,112],"Properties":{"key":"0bf5f58a-1d20-415c-8b1d-21cb801dbe40"}}
to following type:
Utf8Json.JsonParsingException: expected:'String Begin Token', actual:'[', at offset:8
at Utf8Json.JsonReader.ReadStringSegmentCore(Byte[]& resultBytes, Int32& resultOffset, Int32& resultLength)
at Utf8Json.JsonReader.ReadString()
at Utf8Json.Formatters.ByteArrayFormatter.Deserialize(JsonReader& reader, IJsonFormatterResolver formatterResolver)
at Utf8Json.Formatters.utf8tests_CustomFormatter1.Deserialize(JsonReader& , IJsonFormatterResolver )
at Utf8Json.JsonSerializer.Deserialize[T](Byte[] bytes, Int32 offset, IJsonFormatterResolver resolver)
at Utf8Json.JsonSerializer.Deserialize[T](Byte[] bytes, IJsonFormatterResolver resolver)
at Utf8Json.JsonSerializer.Deserialize[T](String json, IJsonFormatterResolver resolver)
at Utf8Json.JsonSerializer.Deserialize[T](String json)
at utf8tests.Program.Main(String[] args) in C:\HelperPrograms\utf8tests\utf8tests\Program.cs:line 21
However, it works if I change the the type to IList, ex:
Using version: 1.3.7
When I am trying to deserialize the following JSON :
{"Body":[123,34,72,105,115,116,111,114,121,83,97,109,112],"Properties":{"key":"0bf5f58a-1d20-415c-8b1d-21cb801dbe40"}}
to following type:
it fails with error:
However, it works if I change the the type to IList, ex:
We do not want to use IList for the
Body
property. Is there a way we can make it work using array itself?Attaching sample to reproduce issue
utf8tests.zip
.
The text was updated successfully, but these errors were encountered: