Skip to content

Omitting null values #6

Open
Open
@Schoonology

Description

@Schoonology

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions