[Building Sakai] JSON

Charles Hedrick hedrick at rutgers.edu
Wed Jan 23 09:16:51 PST 2013


Because of the way I've done the Lessons API, I needed to have code that's in shared go between internal data structures and the JSON string representation. For the moment I've put the JSON library in the component, and I inject the component into the a static field in the library class (in the init method of the component). So things work. It just seems like a weird way to do it.

You're probably right that we'll end up using different JSON libraries, just as we use different XML implementations.

On Jan 23, 2013, at 12:09 PM, John Bush <john.bush at rsmart.com> wrote:

> I personally like Jackson.  Which I think highlights the point of why
> we definitely want to avoid putting anything new in shared.   Our
> posture for awhile which i think is a good one, is to avoid that. That
> way everyone is free to use their own libraries and upgrade them as
> necessary.
> 
> Maybe you could describe more about what your problem is and we could
> find away to avoid that.  I suspect that might lead to having to do
> your marshalling and unmarshalling in its own component to avoid the
> classloader problems.
> 
> On Tue, Jan 22, 2013 at 4:40 PM, Steve Swinsburg
> <steve.swinsburg at gmail.com> wrote:
>> Before settling on just any JSON library, I would strongly recommend talking
>> to someone in the OAE project for their perspective. Not all JSON processors
>> are the same, some are much much faster than others, Jackson being the
>> fastest and feature rich and would be my recommendation.
>> 
>> Jersey uses Jackson which is the JSR 311 reference, so it has good support.
>> 
>> http://geokoder.com/java-json-libraries-comparison
>> http://blog.novoj.net/2012/02/05/json-java-parsers-generators-microbenchmark/
>> http://jersey.java.net
>> 
>> cheers,
>> Steve
>> 
>> On 23/01/2013, at 4:17 AM, Charles Hedrick <hedrick at rutgers.edu> wrote:
>> 
>> Yes, but a newer version, 1.1.1.
>> 
>> On Jan 22, 2013, at 11:02 AM, Charles Severance <csev at umich.edu> wrote:
>> 
>> Are you using the same thing?
>> 
>> 
>> _______________________________________________
>> 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"
>> 
>> 
>> 
>> _______________________________________________
>> 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"
> 
> 
> 
> -- 
> John Bush
> 602-490-0470



More information about the sakai-dev mailing list