I’m submitting a…
- [ ] Regression (a behavior that stopped working in a new release)
- [x] Bug report
- [ ] Performance issue
- [ ] Documentation issue or request
I’m getting a deserialization error when querying data using a flattened context and a dynamic content client in the .NET SDK. The error is "ArgumentException: The value “Sandra” is not of type “Newtonsoft.Json.Linq.JObject” and cannot be used in this generic collection. (Parameter ‘value’)"
No error on Deserialization.
Minimal reproduction of the problem
- Create a simple schema called “mylittlepony”
- Create a field on that schema called “name”
- Create a piece of content based on “mylittlepony” with the name “Sandra” and publish etc.
- Use the C# client manager with CreateDynamicContentsClient for the “mylittlepony” schema
- Create a query context with Flatten enabled i.e QueryContext.Default.Flatten();
- Observe error
- [ ] Self hosted with docker
- [ X ] Self hosted with IIS
- [ ] Self hosted with other version
- [ ] Cloud version
Version: 4.5.1 (Squidex), 5.3.0 (SquidexClientLibrary)
- [ X ] Chrome (desktop)
- [ ] Chrome (Android)
- [ ] Chrome (iOS)
- [ ] Firefox
- [ ] Safari (desktop)
- [ ] Safari (iOS)
- [ ] IE
- [ ] Edge
This issue doesn’t happen with GraphQL, I believe it is because the returned root object is always nested so the dynamic map works.