Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong serialization of some properties #365

Open
pieterdt opened this issue Jul 3, 2024 · 0 comments
Open

wrong serialization of some properties #365

pieterdt opened this issue Jul 3, 2024 · 0 comments

Comments

@pieterdt
Copy link

pieterdt commented Jul 3, 2024

When fetching a blog post through the sdk api, and sending the output unmodified back in a create request results in validation errors.

At least layoutSections and widgetContainers, when empty, get serialized as arrays ([]) and trying to send it (with postman then) with {} in stead of [] works.

The json received for a blog post contains empty objects for those properties, but the serialized body that is sent through the sdk changes that into [].

Simply adding the JSON_FORCE_OBJECT into the serialization call does not solve the trick because attachedStylesheets requires an array.

How can I work around this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant