Have you considered using Jackson and ObjectMapper? there doesn't seem to
be a really good reason to implement this again.

There is a plugin for jackson that reads/writes BSON objects, I'm sure an
adapter could be created to write Tapestry JSON.

What would be really nice is if Tapestry JSON was interface based and not
concrete implementations so that I didn't have to convert between different
JSON representations...

Wishing I had more time to work on this,
Josh


On Thu, Aug 16, 2012 at 1:27 PM, Howard Lewis Ship <[email protected]> wrote:

> I've been thinking of a general-purpose way to convert arbitrary
> Objects into JSONObjects, using naming conventions and annotations.  I
> believe it could also be used to reverse the process.
>
> It would be nice for a Ajax event handler method to be able to return
> an Entity, or a List<Entity> and have that converted to a JSONObject,
> or a JSONArray of JSONObjects automatically. It would also be nice to
> have a ValueEncoder, or equivalent, be able to convert a JSONObject
> back into an Object, knowing the target type.
>
> On Thu, Aug 16, 2012 at 11:47 AM, Thiago H de Paula Figueiredo
> <[email protected]> wrote:
> > On Thu, 16 Aug 2012 14:34:35 -0300, Massimo Lusetti <[email protected]>
> > wrote:
> >
> >> Hi all,
> >
> >
> > Hi!
> >
> >
> >>  I've done some preliminar work on two modules for integration with
> >> MongoDB.
> >
> >
> > Nice! I was thinking of doing that someday too. :)
> >
> > A couple suggestions:
> >
> > * Injection of MongoDB database instance using @Inject or some other
> > annotation.
> > * Type coercions from MongoDB object to JSONObject and vice-versa.
> >
> > --
> > Thiago H. de Paula Figueiredo
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to