Hmm, it seems like this is not enough as lists do not care for keys.
In my use case, im actually building a library for something that
provide default options that are inserted into a flash object. So,
given:

{ key: 'value', something: 'else' }

I *need* to only have one of the "something" key, as it has a bearing
on the application. If someone wants to change / override the default
value in there client application, this is extremely difficult - seems
like it would need a lot of boilerplate code to convert to list, hack
about in the list, then manually convert it back to JsObj. Can we not
add some support for Map[String, JsExp] and going to to/from JsObj?
IMO, it seems like its a natural fit given the key-pair nature of
JsObj.

Thoughts?

Cheers, Tim


On Mar 24, 7:10 pm, Timothy Perrett <timo...@getintheloop.eu> wrote:
> Hmm, I saw those methods but they are not documented so didnt know
> what they did!
>
> Will +* replace an object thats the same?
>
> On Mar 24, 6:45 pm, "marius d." <marius.dan...@gmail.com> wrote:
>
> > Please see
>
> > def props: List[(String,JsExp)]
>
> > and
>
> > def +*(other: JsObj)
>
> > would this suffice ?
>
> > +* looks like an awkward name to me ... ++ expresses concatenation
> > better IMHO.
>
> > Br's,
> > Marius
>
> > On Mar 24, 8:36 pm, Tim Perrett <timo...@getintheloop.eu> wrote:
>
> > > Hey guys,
>
> > > So, I have a JsObj with a bunch of key-value pairs - how can I both
> > > add new key pairs or update existing values?
>
> > > I originally had my data being held as Map[String,String], and
> > > attempted to convert it to JsObj however this was for some reason
> > > causing a massive memory leak which nearly crashed my entire mac. lol.
>
> > > Thoughts?
>
> > > Cheers, Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to