added a toJson example type class + some implementations