I am using NSJSONSerialization to convert a dictionary to JSON.
If I include NSDecimalNumber (== 0) in this dictionary, it is output as 0 . This is not true. 0 is an int. I need it to output as 0.0 .
This is what I do:
NSDecimalNumber *decimal = [[NSDecimalNumber alloc] initWithFloat:0.0f];
Is there any way to output as 0.0 ?
OR Am I mistaken in my assumption? Is 0 valid float?
source share