I am trying to convert some simple HTML into a string value in a JSON object and I\'m having trouble getting the string encoding to not escape the string in NSJSONSerializat
iOS 13 only:
If you're not worried about producing invalid HTML sequences (as described in this answer), you can disable forward-slash escaping by passing the option NSJSONWritingWithoutEscapingSlashes
to the serializer.
Example:
jsonData = [NSJSONSerialization dataWithJSONObject:batchUpdates
options:NSJSONWritingWithoutEscapingSlashes
error:nil];