Dictionary to JSON

All the best for the New Year.

I have some JSON here which are converted to an AS record and from there to a dictionary to find key/values and modify them.
When want to go back there seems to be two ways (for format):

	set {jsonDictionary, anError} to current application's NSJSONSerialization's dataWithJSONObject:sheetDict options:(current application's **NSJSONWritingPrettyPrinted**) |error|:(reference)
	set {jsonDictionary, anError} to current application's NSJSONSerialization's dataWithJSONObject:sheetDict options:(current application's **NSJSONWritingSortedKeys**) |error|:(reference)

For the first one I get many new line and extra spacing for indents - the target app doesn’t like it and I haven’t found a ‘good regex’ yet.
For the second one everything looks fine, but line feeds in the text parts are missing. I can handle that somehow.

But is there ‘an easy way’ without ‘post processing’?

Here’s a post discussing generating JSON data:

Near the end of this post I talk about the NSJSONWritingPrettyPrinted option which introduces whitespace and newlines. You can pass an option value of 0 to turn this off.

Thanks,

This works perfectly.