TouchCode / TouchJSON

A humane JSON Objective-C un-framework. (TouchJSON has been deprecated - see README)
http://touchcode.com/
Other
800 stars 169 forks source link

problem with '\n' when encoding from NSDictionnary to Json #10

Closed ghost closed 13 years ago

ghost commented 13 years ago

Hi there,

first of all, thank you so much for your wonderful and very useful tool. I'm getting a weird error though. I'm encoding a dictionnary to send something to a server. Let say I have a NSDictionnary with 1key/value : "message" : "\n test" When I send this message to the server, I get a 400 error code. When analysing the request sent to the server, it seems like the '\n' is not treated well by the function [CJSONSerializer serializer] serializeObject:], the dictionnary mentionned earlier is serialized into this : "messaget":"\ test"

Do you have any idea why ?

ghost commented 13 years ago

Sorry for this message, Doing some research this morning, I found this note : https://github.com/navellabs/TouchJSON/commit/f7915e1d1c881f04b21dcd4c2a850688f0d4f1d4 Turned out, I didn't update your projet recently. Sorry for the inconvenience, I'll do some research first now !