• 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
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERRest


  • Subject: Re: ERRest
  • From: Luiz Alfredo Carrara Bertusso <email@hidden>
  • Date: Wed, 20 Apr 2016 11:04:01 -0300

I`ve tried to find a solution to my problem, but I couldn`t solve it using the existing code. So i`ve created some changes and made a pull request that can be seen  here: https://github.com/wocommunity/wonder/pull/736. 
I`d be really thankful if you could review my code to suggest some possible improvements.
Thank you all.


2016-04-15 0:12 GMT-03:00 Matthew Ness <email@hidden>:
Luiz, have a look at the IERXRestWriter implementations. You may want to register the format with your own version of a writer.
 
Regards,
 
Matt
 
 
On Fri, Apr 15, 2016, at 12:32 PM, Flavio Donadio wrote:
Troy,
 
 
Luiz needs to exclude a property from the returned JSON if — and only if — it’s value is null.
 
 
Cheers,
Flavio
 
On 14/04/2016, at 22:41, Troy Lumasag <email@hidden> wrote:
 
Hey there,
 
You could use:
ERXKeyFilter filter = ERXKeyFilter.filterWithAttributes();
filter.exclude(Class.Nick, other keys);
 
return response(objectNSArray, filter);
 
Cheers!
 
 
On 4/15/16 4:10 AM, Luiz Alfredo Carrara Bertusso wrote:
Hi, I`ve been developing using WebObjects for 2 months and now i˜m working at a Rest API using ERRest framework.
I have a doubt about the possibility of not returning null values when a certain atribute of a class is null. For example, if an atribute is not filled, i`d like hiding it instead of returning null.
I`ve taken a look at the properties "nilKey" and "writeNilKey" of ERXRestFormatDelegate, but I`m not sure whether how to use them or how they can help me in my task.
This is how the API is leading with null values:
[
  {
    "id": 123,
    "typeClass": "Party",
    "fullName": "John Doe",
    "nick": null
  }
]
And here is how the return should be:
[
  {
    "id": 123,
    "typeClass": "Party",
    "fullName": "John Doe",
  }
]
Thank you, I`ll be waiting for your help.
 
 
 _______________________________________________
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
_______________________________________________
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
 
--
Matt
http://logicsquad.net
 
 

 _______________________________________________
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 (From: Luiz Alfredo Carrara Bertusso <email@hidden>)
 >Re: ERRest (From: Troy Lumasag <email@hidden>)
 >Re: ERRest (From: Flavio Donadio <email@hidden>)
 >Re: ERRest (From: Matthew Ness <email@hidden>)

  • Prev by Date: Re: just checking...
  • Next by Date: SLF4J primer?
  • Previous by thread: Re: ERRest
  • Next by thread: Issues with ERXArrayUtilities.arrayMinusArray() and arrayMinusObject()
  • Index(es):
    • Date
    • Thread