I am converting a [NSDictionary]
to NSString
like so :
do{
let newDict = try NSJSONSerialization.dataWithJSONObject(objectDictionaries, options: NSJSONWritingOptions.PrettyPrinted)
if let json = NSString(data: newDict, encoding: NSUTF8StringEncoding) {
print(json)
}
When the json
prints out I get this:
How do I convert this NSString to JSON without changing the format as this photo shows? The I want to send this json to a API and the format I want is the only one the API will be able to encode,