neuecc / Utf8Json

Definitely Fastest and Zero Allocation JSON Serializer for C#(NET, .NET Core, Unity, Xamarin).
MIT License
2.36k stars 267 forks source link

Deserialize Array (generic type T[]) failed #156

Open wijayaadhisurya opened 5 years ago

wijayaadhisurya commented 5 years ago

I tried to deserialize empty json array ( "[]" ) into some ClassName[] object, but I got exception that said " expected:'{', actual:'[', at offset:0".

JsonSerializer.Deserialize<ClassName[]>(Encoding.UTF8.GetBytes("[]"));

something like that