How do I add a BOOL
to NSMutableDictionary
so that I get true
when serialized as JSON?
I cannot use NSValue
, which is a valid object in the dictionary, but for NSJSONSerialization
, NSValue
is not working.
Use NSNumber
:
@{
@"foo": @YES
}