Couchbase is storing bool as a String


#1

I have a model with a “bool” property, but when I open the resulting .cblite file the object property is stored as a string “YnBsaXN0MDDUAQIDBAUICwxUJHRvcFgkb2JqZWN0c1gkdmVyc2lvblkkYXJjaGl2ZXLRBgdUcm9vdIABogkKVSRudWxsCRIAAYagXxAPTlNLZXllZEFyY2hpdmVyCBEWHygyNTo8P0VGSwAAAAAAAAEBAAAAAAAAAA0AAAAAAAAAAAAAAAAAAABd”.
All the booleans in my app are being stored like this.

Class:
@ interface EVJBaseObject : CBLModel

@ property (nonatomic) bool objectModified;

@ end


#2

Problem solved, I was making NSValue class a CBLJSONEncoding compliant class which was causing this issues.


#3

Thanks for the updates & resolution @tiago_duarte - for further insights can consult the developer portal for CBLJSONEncoding