I'm pretty sure I have to parse the json to json AST, then convert it to Shapeless

LabelledGeneric

, then use Shapeless update somehow to update the case class instance.

Edit 2

After reading the Shapeless source I found that I can generate my own "Default"-object. I managed to create a solution which requires the instance of the case class to be present while parsing the json. I was hoping to avoid this and instead provide the instance later. Anyway here it is:

My original blog post about this technique uses Argonaut (mostly since I wrote it a couple of months before I started working on circe), and that implementation is available as a library, although I've never published it anywhere.