[Building Sakai] Returning JSON from createEntity

Steve Swinsburg steve.swinsburg at gmail.com
Wed Mar 13 15:15:43 PDT 2013


I don't think this should be changed across the board as it would break a lot of integrations, however some way for the developer to decide what to return from the method, ie string or serialised entity, would be ideal. 

Cheers
Steve

Gesendent von meinem iPhone

On 14/03/2013, at 0:12, Aaron Zeckoski <azeckoski at unicon.net> wrote:

> Mostly that was just to adhere to the microformat. I suppose that I
> could change it in trunk but it would mean an API change which could
> affect all implemented providers.
> 
> -AZ
> 
> 
> On Wed, Mar 13, 2013 at 8:41 AM, Adrian Fish <adrian.r.fish at gmail.com> wrote:
>> Hi Aaron,
>> 
>> What I'd like to do though is just return an object from the createEntity
>> method, rather than a String, and have it encoded automagically. I'd rather
>> not explicitly call methods to produce my JSON and then return it. Is there
>> any particular reason only a String can be returned from createEntity?
>> 
>> Cheers,
>> Adrian.
>> 
>> 
>> On 13 March 2013 12:22, Aaron Zeckoski <azeckoski at unicon.net> wrote:
>>> 
>>> There's a JSON encoder in the EB reflect utils. I tried GSON and found
>>> it did not handle things like maps correctly. It worked OK for POJOs
>>> (unless they contained something like a map or an array).
>>> 
>>> -AZ
>>> 
>>> 
>>> On Wed, Mar 13, 2013 at 5:28 AM, Adrian Fish <adrian.r.fish at gmail.com>
>>> wrote:
>>>> Hi all,
>>>> 
>>>> Does anybody know how to return JSON from createEntity in an entity
>>>> provider? I know you can craft it; I mean by returning a POJO and having
>>>> it
>>>> serialized by the framework.
>>>> 
>>>> Cheers,
>>>> Adrian.
>>>> 
>>>> _______________________________________________
>>>> sakai-dev mailing list
>>>> sakai-dev at collab.sakaiproject.org
>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>> 
>>>> TO UNSUBSCRIBE: send email to
>>>> sakai-dev-unsubscribe at collab.sakaiproject.org
>>>> with a subject of "unsubscribe"
>>> 
>>> 
>>> 
>>> --
>>> Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile
> 
> 
> 
> -- 
> Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"


More information about the sakai-dev mailing list