NSJSONSerialization should have an option to skip null entries

Originator:marcelofabri.mf
Number:rdar://14500194 Date Originated:19-Jul-2013 09:48 PM
Status:Duplicate/12607969 Resolved:
Product:iOS SDK Product Version:6.1
Classification:Enhancement Reproducible:Always
 
This is a duplicate of rdar://12607969

NSJSONSerialization's JSONObjectWithData:options:error: can produce NSArray/NSDictionary objects that contain NSNull instances.  That's reasonable, since JSON can encode these.  But, there are cases were that's not desirable behavior.

I'd love to have an additional NSJSONReadingOptions value that does not add NSNulls, and just treats those values as not present.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!