Closed robearlam closed 1 week ago
I encountered a similar issue with handling empty strings and have submitted a pull request to address it. You can review the changes here: https://github.com/Sitecore/ASP.NET-Core-SDK/pull/12
I have commented on #12 and I believe these 2 issues are indeed very similar and require a strategic architectural decision on the support of Custom Content Resolvers.
What happened?
The OOTB
Navigation
component in XM-Cloud uses a custom Content Resolver to adjust the returned JSON and make theroute.placeholders.placeholder[0].fields
property into an Array. This SDK is configured to only handle thefield
property as an Object.Navigation Item RCR Field contents:
Target RCR type:
This causes the
Sitecore.AspNetCore.SDK.LayoutService.Client.Serialization.Converter.FieldParser
to throw aJsonException
as its expecting and object and not an array:Reproduction Steps
Actual Behavior
Expected Behavior
Relevant log output
Code of Conduct