bugGNUstep - Bugs: bug #37314, NSJSONSerialization converts...


You are not allowed to post comments on this tracker with your current authentication level.

bug #37314: NSJSONSerialization converts string to JSON incorrect

Submitted by:  Vitaliy <vmyrik>
Submitted on:  Mon 10 Sep 2012 01:06:37 PM UTC  
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Tue 11 Sep 2012 05:55:33 AM UTC, comment #1:

Thanks ... I replaced the string escaping with code from the web services library, so this should be fixed in SVN now.

Richard Frith-Macdonald <CaS>
Project Member
Mon 10 Sep 2012 01:06:37 PM UTC, original submission:

I have NSDictionary instance that contains multi-line string. When I serialize it using NSJSONSerialization, I get the following:

{"key": "bla-bla

instead of:

{"key":"bla-bla \n bla-bla"}

JSON standard implies that line-feed should be represented as "\n". Apple's implementation of NSJSONSerialization behaves well.

P.S. Sorry for my English.

Vitaliy <vmyrik>


Attached Files
file #26520:  string.gif added by vmyrik (17KiB - image/gif)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by vmyrik (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    Tue 11 Sep 2012 05:55:33 AM UTC CaS StatusNone => Fixed
        Open/ClosedOpen => Closed
    Mon 10 Sep 2012 01:06:37 PM UTC vmyrik Attached File- => Added string.gif, #26520

    Back to the top

    Powered by Savane 3.3