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

Handling white space (with tests) #1

Closed jonathanpenn closed 13 years ago

jonathanpenn commented 13 years ago

Hey, great framework. I've used it on two projects thus far and it's been marvelous. On this latest project, I finally needed to serialize strings that had line breaks and the library broke.

It would serialize the following string:

@"This is a\ntest"

Like this: @"This is a\ test"

So, I wrote some unit tests to ensure the line breaks would be translated properly, fixed the code, and did the same for the other escaped white spaces and the backslash.

Let me know if you have any questions.

schwa commented 13 years ago

Wow. Good catch. Surprised this hasn't come up already. Code committed to main repo.

jonathanpenn commented 13 years ago

Great! Thanks again for the library. Nice and fast!