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

Group
 
 

bug #37314: NSJSONSerialization converts string to JSON incorrect

Submitter:  Vitaliy <vmyrik>
Submitted:  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
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-09-11 CaS StatusNone Fixed
        Open/ClosedOpen Closed
    2012-09-10 vmyrik Attached File- Added string.gif, #26520

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code