Can anyone point me towards a simple example of Jackson serialization/deserialization with their Scala module for 2.10? I'm looking for reflection-based JSON not requiring field-by-field annotation or assignment and it seemed this could do that, but their documentation includes no examples.
If I have a case class:
case class Person(name:String, age:Int)
val person = Person("Fred", 65)
So from their github readme:
val mapper = new ObjectMapper()
mapper.registerModule(DefaultScalaModule)
OK, now what...? How to I convert p to/from JSON?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…