[Building Sakai] JSON

Mark J. Norton markjnorton at earthlink.net
Fri Sep 20 07:10:26 PDT 2013


Ah, that explains why I didn't see a Maven dependency.  I'm not 
suggesting that you move away from your custom implementation.  It 
serves a specific need.

I've looked at Jackson and considered it.  I've also looked at Simple 
JSON and the Java version of JSON-LD (JSON with Linked Data).  This 
later is used by a repository that's part of the application I'm working 
on (the Digital Public Library of America).  One thing that bothers me 
about recent implementations is that JSON objects are returned as Java 
Object, force me to either use introspection or make assumptions about 
the actual object class.  Older implementations had a JSONObject class 
(the original json.org implementation, for example).  I kinda preferred 
that approach, but it looks like the industry trend is against me (as 
usual).

Any other advice you have would be appreciated.

- Mark

On 9/20/2013 9:13 AM, Aaron Zeckoski wrote:
> It uses a custom package I wrote to handle some specific use cases
> which the other JSON parsers and generators did not support at the
> time (mostly around scanning POJOs which have loops in their object
> structures like sakai entities and hibernate objects). There may be
> better options now but a lot of careful testing would be needed to
> replace what is there with something that produces equivalent JSON.
>
> For non-Sakai projects I tend to use Jackson or the one that is built
> into Grails (if it is a grails project). There are some limitations to
> the jackson processor when reading in JSON but generating JSON from
> maps or pojos is fairly straightforward in most cases.
>
> -AZ
>
>
> On Fri, Sep 20, 2013 at 8:56 AM, Mark J. Norton
> <markjnorton at earthlink.net> wrote:
>> Does anyone know what "flavor" of JSON Sakai is using - such as in the
>> Entity Broker?  I need a JSON package for an application and looking for
>> recommendations.
>>
>> - Mark Norton
>>
>> _______________________________________________
>> 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