• 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: Joda LocalTime attribute in ERRest
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Joda LocalTime attribute in ERRest


  • Subject: Re: Joda LocalTime attribute in ERRest
  • From: Philippe Rabier <email@hidden>
  • Date: Wed, 23 Sep 2015 14:42:25 +0200

Hi Paul,

You have to modify ERXRestUtils but I’m surprised it’s not already done.

There are 2 methods:
- convertValue to build the output
- coerceValueToTypeNamed to convert input data

For example, we wanted to support epoch format for NSTimestamp attributes so we modified a little bit ERXRestUtils and ERXRestRequestNode:
https://github.com/Sophiacom/wonder/tree/sophiacom/Frameworks/EOF/ERRest/Sources/er/rest

This part should be refactored because it’s too big. But we moved away from the full ERRest stack so we won’t do it, I think, because we won’t be able to test this modifications in production.

Philippe
 
On 23 sept. 2015, at 01:34, Paul Hoadley <email@hidden> wrote:

I’ll simplify the question:

On 16 Sep 2015, at 10:12 am, Paul Hoadley <email@hidden> wrote:

What are my options here? I find it hard to believe that NSPropertyListSerialization knows how to handle Joda LocalTime specifically, so why is it getting the output right and the JSON serialiser isn’t? Is there an easy way to add custom types to ERRest? It looks like LocalDate formatting is handled in ERXRestUtils. Is that the only way to handle formatting a LocalTime?

What are my options for adding a new attribute type (Joda LocalTime) to ERRest? Can this be done at a high level, or am I looking at changes deep within the framework?


-- 
Paul Hoadley
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
  • Follow-Ups:
    • Re: Joda LocalTime attribute in ERRest
      • From: Paul Hoadley <email@hidden>
References: 
 >Joda LocalTime attribute in ERRest (From: Paul Hoadley <email@hidden>)
 >Re: Joda LocalTime attribute in ERRest (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Re: AjaxFlickrBatchNavigation
  • Next by Date: Preferred way for fetching with given SQL select statement?
  • Previous by thread: Re: Joda LocalTime attribute in ERRest
  • Next by thread: Re: Joda LocalTime attribute in ERRest
  • Index(es):
    • Date
    • Thread