Deserializing ListMap with lift-json

17 views
Skip to first unread message

Joe Barnes

unread,
Feb 2, 2016, 2:54:09 PM2/2/16
to Lift
Has anyone successfully written a ListMap deserializer for lift-json?  We tried writing our own Serializer, but lift-json keeps expecting our case class's constructor to have a Map.  I think it's because ListMap is a child type of Map, so lift-json is finding map before it finds our custom deserialization case.

Joe

Antonio Salazar Cardozo

unread,
Feb 2, 2016, 10:39:32 PM2/2/16
to Lift
That sounds slightly weird, but perhaps adding a type hint would help?
Thanks,
Antonio

Joe Barnes

unread,
Feb 3, 2016, 6:20:26 AM2/3/16
to lif...@googlegroups.com
I'd like to avoid changing the serialization of the object with a type hint... but perhaps I can no-op the serialization and use only the name of the field on deserialization?  I'll have to look today when I get back to the code.

Joe


--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to a topic in the Google Groups "Lift" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/liftweb/IyqS-w52kKM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Antonio Salazar Cardozo

unread,
Feb 4, 2016, 1:13:23 PM2/4/16
to Lift
Maybe you can also attach a custom deserializer to the container and
use your own routine to build the object?
Thanks,
Antonio
To unsubscribe from this group and all its topics, send an email to liftweb+unsubscribe@googlegroups.com.

Joe Barnes

unread,
Feb 4, 2016, 5:37:06 PM2/4/16
to lif...@googlegroups.com
That's what we were thinking of doing, actually.  

Joe


Antonio
To unsubscribe from this group and all its topics, send an email to liftweb+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to a topic in the Google Groups "Lift" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/liftweb/IyqS-w52kKM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to liftweb+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages