JSONSyntaxHighlight
JSONSyntaxHighlight copied to clipboard
Customising options
I'm trying to use the NSJSONWritingSortedKeys
option to get the JSON keys sorted, but I noticed there is no method to set the writing options.
Would it be acceptable to add a new init method to specify the writing options? For instance, - (instancetype) initWithJSON:(id)JSON options:(NSJSONWritingOptions)options
. One counterargument would be that the options are only used if the object is a valid JSON object, but personally I find that odd already, as I would have expected an error/exception of some kind.