Hi Sean,

There is already this constructor in the JsonRepresentation class:
    public JsonRepresentation(JSONObject jsonObject)

So you can use something like this with 1.0 already:
   new JsonRepresentation(new JSONObject(myObject, [other args]))

Am I missing something? What additional constructors are you looking for? If
it doesn't require a switch to JSON-lib, I could probably easily add it to
1.1 M1.

Best regards,
Jerome  

> -----Message d'origine-----
> De : news [mailto:[EMAIL PROTECTED] De la part de Sean Landis
> Envoyé : mercredi 31 octobre 2007 21:55
> À : [email protected]
> Objet : Re: JSON represenation based on json-lib from 
> http://json-lib.sourceforge.net/
> 
> Jerome Louvel <contact <at> noelios.com> writes:
> 
> > Hi Evgeny,
> > 
> > I've updated the related RFE 
> > 
> > "Improve support for JSON"
> > http://restlet.tigris.org/issues/show_bug.cgi?id=131
> > 
> > I'm a bit reluctant to upgrade due to the fact that it requires two
> > additional dependencies (jakarta commons-beanutils 1.7.0 
> and ezmorph 1.0.3)
> > compared to the current list of Restlet dependencies... 
> People already
> > complain about the current size of the distribution.
> > 
> > I hope to have a more modular distribution in the future 
> (core package and
> > optional downloads), but probably not for 1.1.
> > 
> > Beside that it seems like a very cool enhancement, with support for
> > streaming. I've updated the RFE to plan for it in Restlet 1.2.
> 
> Jerome,
> I'm trying to work with JsonRepresentation right now and I 
> find it insufficient.
> The constructor JSONObject(Object) is key. W/o it, the value of this 
> representation is extremely diminished. Dare I say useless 
> for any but the
> most trivial cases. If there is any way this could be pushed 
> into 1.1 (in the
> next milestone) it would make the difference between me being 
> able to use 
> JSON on a project and not.
> 
> Yes the dependencies grow but it's really worth it in this 
> case. If additional
> dependencies are becoming a problem, then it might make sense 
> to consider a
> different approach to packaging Restlet. Maybe 'subsystems' 
> like JSON, JAXB,
> etc, could be distributed separately with the appropriate 
> related jars. 
> People would download each subsystem or feature they want to use.
> 
> Sean 

Reply via email to