Spine icon indicating copy to clipboard operation
Spine copied to clipboard

Supporting Bool while saving

Open sachin-sat opened this issue 8 years ago • 1 comments

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

sachin-sat avatar Jan 25 '17 13:01 sachin-sat

Do you use an NSNumber variable and a BooleanAttribute? That should work.

wvteijlingen avatar Feb 11 '17 23:02 wvteijlingen