easy solution for (re)storing Scala immutable containers
45 views
Skip to first unread message
Andy Coolware
unread,
Sep 12, 2012, 11:23:59 PM9/12/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scala-user
Hi,
I am in the need of storing and reading basic immutable containers
like Map or List or combination of such (could be nested). Preferably
in a human readable format, something like picking in Python.
What is available in Scala in that regard?
Thx,
Andy
Nick H
unread,
Sep 13, 2012, 4:54:29 AM9/13/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scala...@googlegroups.com
If you want human readable, then go with something like YAML or JSON. There are Scala libraries for these such as Snakeyaml and Jerkson. In the simplest cases you can just pass these libraries a data structure (which can be any depth of nested maps and lists) and get back a string.