I am using uPickle/ScalaJS to deserialize a js.Dynamic object into a case class using this code fragment:
read[myClass](JSON.stringify(dynObj))
where myClass is the case class and dynObj is the js.Dynamic object.
Is there a boilerplate-free and simpler way to do this?
In order to serialize a case class, I have been able to serialize to js.Dynamic using Shapeless using this example as a starting point:
Converting nested case classes to nested Maps using Shapeless
I would like to be able to use uPickle to do this instead. How can I accomplish the round-trip with uPickle?