Port pickler type class architecture from scala-pickling