import json
from google.protobuf.json_format import MessageToDict

def grpc_message_to_json_string(message):
    return json.dumps(MessageToDict(
        message, including_default_value_fields=True, preserving_proto_field_name=True, use_integers_for_enums=False),
        sort_keys=True)
