[Lift] Re: BSON support in lift-json

2010-03-10 Thread Joni Freeman
Hi, Here's another idea which might work. It is a bit hackish and needs further analysis, but small experiments I did were promising. What if we change JsonAST just a little by adding a new abstract node called JLiteral to represent simple nonstructural types (note, it is sealed). object

[Lift] Re: BSON support in lift-json

2010-03-08 Thread Joni Freeman
This is a tricky one. The problem with extending the AST is that the AST is implemented as an algebraic data type. And by definition it is not possible to extend such a type. One way to add BSON support is to create a new AST for it which includes all extended literals. Then add a few core

Re: [Lift] Re: BSON support in lift-json

2010-03-08 Thread David Pollak
On Mon, Mar 8, 2010 at 12:50 AM, Joni Freeman freeman.j...@gmail.comwrote: This is a tricky one. The problem with extending the AST is that the AST is implemented as an algebraic data type. And by definition it is not possible to extend such a type. Just throwing an idea out and it's likely

Re: [Lift] Re: BSON support in lift-json

2010-03-08 Thread Ross Mellgren
I personally think hybrid approaches make sense for certain designs even if they are a little odd. My thought originally was having a new member of the ADT which is not final which represents extensions, e.g. JValue \_ JExtension \_ JDate where JExtensions could be ignored or passed