scala - (de)serialize class to/from JSON -


reasonably new scala, i'm looking way serialize , deserialize class to/from json. i'm familiar jackson annotations java, , use style if makes sense in scala.

two parts causing me problems: private constructor parameters, , hashsets.

i've tried json4s , jackson-module-scala, seem able them want. both reported errors hashsets. sorry, don't have errors handy, can find if necessary.

as test, here's class i'm trying serialize deserialize:

class foo(val public: string, private: string) {     somelist: mutable.hashmap[string] = new mutable.hashmap[string]("bar")      def func = { .. } } 

thanks help!

did try using case classes? otherwise think there annotation make class compatible pojo classes @beanproperty. can find more here https://twitter.github.io/scala_school/java.html


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -