scala> <tips><group type="Foo"></group><group
type="Bar"><tip><text>xxx</text></tip><tip><text>yyy</text></tip></
group></tips>
res0: scala.xml.Elem = <tips><group type="Foo"></group><group
type="Bar"><tip><text>xxx</text></tip><tip><text>yyy</text></tip></
group></tips>
scala> Xml.toJson(res0)
res1: net.liftweb.json.JsonAST.JValue =
JObject(List(JField(tips,JObject(List(JField(group,JArray(List(JObject(List(JField(group,JString()),
JField(type,JString(Foo)))), JObject(List(JField(type,JString(Bar)),
JField(tip,JArray(List(JObject(List(JField(text,JString(xxx)))),
JObject(List(JField(text,JString(yyy)))))))))))))))))
scala> Printer.compact(render(res1))
res2: String = {"tips":{"group":[{"group":"","type":"Foo"},
{"type":"Bar","tip":[{"text":"xxx"},{"text":"yyy"}]}]}}
Note the extra group String in res2.
-harryh
--
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.