• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ERRest wrapped JSON format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERRest wrapped JSON format


  • Subject: Re: ERRest wrapped JSON format
  • From: Farrukh Ijaz <email@hidden>
  • Date: Sat, 06 Aug 2011 04:37:05 +0300

Hi Charles,

Just create an NSDictionary object and set a key "User" the value you are returning. It will serialize it the way you intend to.

Farrukh

Sent from my iPad 2

On 2011-08-06, at 3:17 AM, Charles Young <email@hidden> wrote:

> Hi,
>
> I am currently using ERRest to output some fairly simple JSON describing a user. It looks like this:
>
> [{
>    "id":1,
>    "type":"User",
>    "creationDate":"2011-02-11T10:20:48Z",
>    "email":null,
>    "lastLogin":null,
>    "password":"W6ph5Mm5Pz8GgiULbPgzG37mj9g=",
>    "username":"charles"
> }]
>
> I'd like it to look like:
>
> {"User":[
>        {
>        "id":1,
>        "type":"User",
>        "creationDate":"2011-02-11T10:20:48Z",
>        "email":null,
>        "lastLogin":null,
>        "password":"W6ph5Mm5Pz8GgiULbPgzG37mj9g=",
>        "username":"charles"
>        }]
> }
>
> I'm assuming this is a pretty simple configuration change on the net.sf.json.JSONSerializer, but I can't see it.
>
> Am I trying to do something out of the ordinary?
>
> Cheers,
> Charles
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >ERRest wrapped JSON format (From: Charles Young <email@hidden>)

  • Prev by Date: ERRest wrapped JSON format
  • Next by Date: Re: EOModelDoc output no longer viewable with Safari 5.1, Firefox 5.0.1
  • Previous by thread: ERRest wrapped JSON format
  • Next by thread: Re: Lion and WO
  • Index(es):
    • Date
    • Thread