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

Omitting null values #6

Open
Schoonology opened this issue Jul 1, 2018 · 0 comments
Open

Omitting null values #6

Schoonology opened this issue Jul 1, 2018 · 0 comments

Comments

@Schoonology
Copy link

Rather than just submit a PR, I thought it wise to discuss potential solutions first.

I just started replacing a lot of custom JSON-API-consuming Swift code with Spine, and noticed an issue. The server that I'm integrating with is using swagger-tools, which means that, unfortunately, a value cannot be null, it must either be the appropriate type (e.g. a String) or omitted. It looks like SerializeOperation.addAttributes supports this behavior via the OmitNullValues option, but I don't see anywhere in the public API where this option is exposed, nor any internal implementation that uses it.

For the time being, I have a local version of Spine where that option is always provided. What is the right way to expose this behavior to consumers?

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