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

 
 

You are not allowed to post comments on this tracker with your current authentification 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/FoundationSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned 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
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 (17kB - image/gif)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to 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 UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 10 Sep 2012 01:06:37 PM UTCvmyrikAttached File-=>Added string.gif, #26520

    Back to the top


    Powered by Savane 3.1-cleanup