[SOLVED] JsonReaderException - Deserialization

Hello everyone,

I have an issue with json deserialization when querying a simple home page model.
I’m actually using your Squidex.ClientLibrary.

  • [ X ] Checked the logs and have provided the logs if I found something suspicious there

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [ X ] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

Client-side

HomeData.cs
SquidexService.cs
Index.cshtml

https://imgur.com/a/fqO3nuK

Server-side

HomeSchema from Squidex
Response from Api

https://imgur.com/a/tCbooIg

I’m getting an error when calling GetHomeAsync() :

JsonReaderException: Unexpected character encountered while parsing value: {. Path ‘items[0].data.title’, line 1, position 181.

Environment

  • [ X ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: Stable

Browser:

  • [ X ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Thanks for your help !

Just resolved my problem.

I was using System.Text.Json.Serialization instead of Newtonsoft.Json for JsonConverter attribute :unamused:.

Have a good day :upside_down_face: !

5 Likes