I would make this an inner class. Have a look art the other serializer hooks.