parameters: (self, message)
return_statement: return self._RegularMessageToJsonObject(sub_message, js)
docstring: Converts Any message according to Proto3 JSON Specification.
docstring_summary: Converts Any message according to Proto3 JSON Specification.
docstring_tokens: Converts Any message according to Proto3 JSON Specification .
function: def _AnyMessageToJsonObject(self, message):
      """Converts Any message according to Proto3 JSON Specification."""
      if not message.ListFields():
        return {}
      # Must print @type first, use OrderedDict instead of {}
      js = OrderedDict()
      type_url = message.type_url
      js['@type'] = type_url
      sub_message = _CreateMessageFromTypeUrl(type_url)
      sub_message.ParseFromString(message.value)
      message_descriptor = sub_message.DESCRIPTOR
      full_name = message_descriptor.full_name
      if _IsWrapperMessage(message_descriptor):
        js['value'] = self._WrapperMessageToJsonObject(sub_message)
        return js
      if full_name in _WKTJSONMETHODS:
        js['value'] = methodcaller(_WKTJSONMETHODS[full_name][0],
                                   sub_message)(self)
        return js
      return self._RegularMessageToJsonObject(sub_message, js)
function_tokens: def _AnyMessageToJsonObject ( self , message ) : if not message . ListFields ( ) : return { } # Must print @type first, use OrderedDict instead of {} js = OrderedDict ( ) type_url = message . type_url js [ '@type' ] = type_url sub_message = _CreateMessageFromTypeUrl ( type_url ) sub_message . ParseFromString ( message . value ) message_descriptor = sub_message . DESCRIPTOR full_name = message_descriptor . full_name if _IsWrapperMessage ( message_descriptor ) : js [ 'value' ] = self . _WrapperMessageToJsonObject ( sub_message ) return js if full_name in _WKTJSONMETHODS : js [ 'value' ] = methodcaller ( _WKTJSONMETHODS [ full_name ] [ 0 ] , sub_message ) ( self ) return js return self . _RegularMessageToJsonObject ( sub_message , js )