Skip to content
This repository has been archived by the owner on May 20, 2021. It is now read-only.

Allowing explicitly putting null #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GRiMe2D
Copy link

@GRiMe2D GRiMe2D commented Jan 18, 2018

Sometimes we need JSON null values, especially when API requests with PATCH method where null values mean "delete" the property

/**
* The style that wrap should ignore nil values or explicitly put JSON null value
*/
var wrapNilStyle: WrapNilStyle { get }
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, using bool value provides easier integration but using enum makes possible to add more options in future

@hebertialmeida
Copy link

That would be useful for me too, any idea if this will be merged or any workaround for that? I need to send null for a specific endpoint...

@GRiMe2D
Copy link
Author

GRiMe2D commented Mar 15, 2018

@hebertialmeida
You actually can grab my fork for ability to send null

In Cartfile just replace Wrap to

github "aabbcc-double/Wrap" "a80b5f40454"

I'll tag it later

@hebertialmeida
Copy link

@GRiMe2D I actually ended up forking it and make a customization based on #36, it's less code change and works great...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants