fix the issue with passing options to the json serializer