[Building Sakai] Returning JSON from createEntity

Aaron Zeckoski azeckoski at unicon.net
Wed Mar 13 06:12:00 PDT 2013


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


More information about the sakai-dev mailing list