[Building Sakai] Returning JSON from createEntity

Adrian Fish adrian.r.fish at gmail.com
Wed Mar 13 05:41:24 PDT 2013


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130313/fbfb9a9b/attachment.html 


More information about the sakai-dev mailing list