[Lift] Re: lift-json and attributes
On Mon, Oct 5, 2009 at 9:01 PM, Joni Freeman freeman.j...@gmail.com wrote: Thanks Richard! This is a feature request and I just committed an implementation to my branch. I've just pulled 1-1 SNAPSHOT, tried it, and it works just how I need it to. Thank you Richard --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Lift] Re: lift-json and attributes
This is a feature request and I just committed an implementation to my branch. This looks great. If there is anyway it could get committed to master in time for M6 (which is coming out any day now right?) that would be very very helpful to me. Thanks for your work on this stuff Joni! -harryh --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Lift] Re: lift-json and attributes
On Tue, Oct 6, 2009 at 9:03 AM, harryh har...@gmail.com wrote: This is a feature request and I just committed an implementation to my branch. This looks great. If there is anyway it could get committed to master in time for M6 (which is coming out any day now right?) that would be very very helpful to me. Sorry. We froze on Sunday. :-( Thanks for your work on this stuff Joni! -harryh -- 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 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Lift] Re: lift-json and attributes
Thanks Richard! This is a feature request and I just committed an implementation to my branch. I modified existing example to contain few attributes to show how they are mapped: http://github.com/dpp/liftweb/blob/joni_wip_xml/lift-json/src/test/scala/net/liftweb/json/XmlExamples.scala If other committers give it the green light I will push it to master. Cheers Joni On Oct 5, 5:41 pm, Richard Dallaway dalla...@gmail.com wrote: Loving the new lift-json code. We've been producing XML for a REST API, and now need to produce JSON. lift-json to the rescue, except...the Xml converter doesn't handle attributes: scala val xml = user id=7nameBert/name/user xml: scala.xml.Elem = user id=7nameBert/name/user scala val json = toJson(xml) json: net.liftweb.json.JsonAST.JValue = JObject(List(JField(user,JObject(List(JField(name,JString(Bert))) scala JsonDSL.compact(JsonAST.render(json)) res5: String = {user:{name:Bert}} I'd expect res5 to be something like: {user:{id:7,name:Bert}} I'm either missing a clue, or this is a feature request. I can see there's ambiguity in how you might map the above JSON back to XML with attributes, but it seems reasonable that if you have XML + attributes they would be present in a JSON representation. Thank you Richard --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---