Json Lift

3 views
Skip to first unread message

Randinn

unread,
Jan 27, 2010, 2:05:56 PM1/27/10
to Lift
Does anyone know of some sample code that shows Json extract with a
mapper model?

Naftoli Gugenheim

unread,
Jan 27, 2010, 2:10:50 PM1/27/10
to lif...@googlegroups.com
Do you have a question about lift-json per se, or lift-mapper per se? Or do you want to know whether there is some built in integration?

-------------------------------------
Randinn<ran...@gmail.com> wrote:

Does anyone know of some sample code that shows Json extract with a
mapper model?

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.

Randinn

unread,
Jan 27, 2010, 2:23:52 PM1/27/10
to Lift
Well, I have this snippit and model and need to figure out how to take
the extracted information and paste it into the model. I was just
looking for some example code to discern how to do it.

http://paste.pocoo.org/show/165511/

http://paste.pocoo.org/show/165532/

On Jan 28, 6:10 am, Naftoli Gugenheim <naftoli...@gmail.com> wrote:
> Do you have a question about lift-json per se, or lift-mapper per se? Or do you want to know whether there is some built in integration?
>
> -------------------------------------
>

Naftoli Gugenheim

unread,
Jan 27, 2010, 2:38:16 PM1/27/10
to lif...@googlegroups.com
So it's a mapper question?

-------------------------------------

Randinn

unread,
Jan 27, 2010, 4:38:09 PM1/27/10
to Lift
Yes, it seems so.

On Jan 28, 6:38 am, Naftoli Gugenheim <naftoli...@gmail.com> wrote:
> So it's a mapper question?
>
> -------------------------------------
>

Naftoli Gugenheim

unread,
Jan 27, 2010, 4:58:04 PM1/27/10
to lif...@googlegroups.com
Okay, so can you clarify a bit more? Do you have a mapper class with fields defined? Do you know how to instantiate it? To set the value of its fields? To save it (back) to the database?


-------------------------------------

Randinn

unread,
Jan 27, 2010, 5:04:56 PM1/27/10
to Lift
I think so, the code on the paste site is the model and the snippit (I
have made some minor changes since I posted those), the trouble I'm
having is figuring out how to save it (to take it from the extracted
Json).

On Jan 28, 8:58 am, Naftoli Gugenheim <naftoli...@gmail.com> wrote:
> Okay, so can you clarify a bit more? Do you have a mapper class with fields defined? Do you know how to instantiate it? To set the value of its fields? To save it (back) to the database?
>
> -------------------------------------
>

David Pollak

unread,
Jan 27, 2010, 5:13:57 PM1/27/10
to lif...@googlegroups.com
Have you looked at .asJs which will render your component as a JsExp?

If you're looking for bi-directional stuff, please see http://groups.google.com/group/liftweb/browse_thread/thread/80e8b2e871a2a8d4/2e30e7342689d147?#2e30e7342689d147
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

Naftoli Gugenheim

unread,
Jan 27, 2010, 5:46:00 PM1/27/10
to lif...@googlegroups.com
What does "I think so" mean? I asked you four very specific questions.
Mapper, like any ORM, is a way of holding data in objects that map to tables in a database, and knows how to transfer both ways.

-------------------------------------
Randinn<ran...@gmail.com> wrote:

I think so, the code on the paste site is the model and the snippit (I
have made some minor changes since I posted those), the trouble I'm
having is figuring out how to save it (to take it from the extracted
Json).

On Jan 28, 8:58 am, Naftoli Gugenheim <naftoli...@gmail.com> wrote:
> Okay, so can you clarify a bit more? Do you have a mapper class with fields defined? Do you know how to instantiate it? To set the value of its fields? To save it (back) to the database?
>
> -------------------------------------
>
> Randinn<rand...@gmail.com> wrote:
>
> Yes, it seems so.
>
> On Jan 28, 6:38 am, Naftoli Gugenheim <naftoli...@gmail.com> wrote:
>
>
>
> > So it's a mapper question?
>
> > -------------------------------------
>

Randinn

unread,
Jan 27, 2010, 5:55:00 PM1/27/10
to Lift
No, I haven't, I'll research .asjs, thank you for the info.

On Jan 28, 9:13 am, David Pollak <feeder.of.the.be...@gmail.com>
wrote:


> Have you looked at .asJs which will render your component as a JsExp?
>

> If you're looking for bi-directional stuff, please seehttp://groups.google.com/group/liftweb/browse_thread/thread/80e8b2e87...


>
>
>
> On Wed, Jan 27, 2010 at 11:23 AM, Randinn <rand...@gmail.com> wrote:
> > Well, I have this snippit and model and need to figure out how to take
> > the extracted information and paste it into the model. I was just
> > looking for some example code to discern how to do it.
>
> >http://paste.pocoo.org/show/165511/
>
> >http://paste.pocoo.org/show/165532/
>
> > On Jan 28, 6:10 am, Naftoli Gugenheim <naftoli...@gmail.com> wrote:
> > > Do you have a question about lift-json per se, or lift-mapper per se? Or
> > do you want to know whether there is some built in integration?
>
> > > -------------------------------------
>
> > > Randinn<rand...@gmail.com> wrote:
>
> > > Does anyone know of some sample code that shows Json extract with a
> > > mapper model?
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "Lift" group.
> > > To post to this group, send email to lif...@googlegroups.com.
> > > To unsubscribe from this group, send email to

> > liftweb+u...@googlegroups.com<liftweb%2Bunsu...@googlegroups.com>


> > .
> > > For more options, visit this group athttp://
> > groups.google.com/group/liftweb?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Lift" group.
> > To post to this group, send email to lif...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > liftweb+u...@googlegroups.com<liftweb%2Bunsu...@googlegroups.com>


> > .
> > For more options, visit this group at
> >http://groups.google.com/group/liftweb?hl=en.
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net

> Beginning Scalahttp://www.apress.com/book/view/1430219890

Randinn

unread,
Jan 27, 2010, 9:55:01 PM1/27/10
to Lift
Thank you Naftoli and David for taking your time to help me.
Reply all
Reply to author
Forward
0 new messages