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
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
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.

Andy Coolware

unread,
Sep 13, 2012, 1:28:42 PM9/13/12
to scala...@googlegroups.com
Hi,

Thanks for the pointers. I could not find anything online before so it
really helped. I went with jerkson.

Best,
Andy
Reply all
Reply to author
Forward
0 new messages