Spine
Spine copied to clipboard
Supporting Bool while saving
While saving a resource with Bool value, it returns error(data type mismatch, my server expects bool value)from server.
let newObject = Person.init() newObject.is_american = true newObject.name = "King" spine.save(newObject)
the debug follows
{"data":{"type":"persons","attributes":{"name":"King","is_american =":"1"}}}
my server throws error due to this.
thanks in advance
Do you use an NSNumber
variable and a BooleanAttribute
? That should work.