JSONSyntaxHighlight icon indicating copy to clipboard operation
JSONSyntaxHighlight copied to clipboard

Customising options

Open mpaddle opened this issue 6 years ago • 0 comments

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.

mpaddle avatar Jun 21 '18 12:06 mpaddle