Package google :: Package protobuf :: Module json_format :: Class _Parser
[hide private]
[frames] | no frames]

Class _Parser

source code

object --+
         |
        _Parser

JSON format parser for protocol message.

Instance Methods [hide private]
 
__init__(self, ignore_unknown_fields, descriptor_pool)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
ConvertMessage(self, value, message)
Convert a JSON object into a message.
source code
 
_ConvertFieldValuePair(self, js, message)
Convert field value pairs into regular message.
source code
 
_ConvertAnyMessage(self, value, message)
Convert a JSON representation into Any message.
source code
 
_ConvertGenericMessage(self, value, message)
Convert a JSON representation into message with FromJsonString.
source code
 
_ConvertValueMessage(self, value, message)
Convert a JSON representation into Value message.
source code
 
_ConvertListValueMessage(self, value, message)
Convert a JSON representation into ListValue message.
source code
 
_ConvertStructMessage(self, value, message)
Convert a JSON representation into Struct message.
source code
 
_ConvertWrapperMessage(self, value, message)
Convert a JSON representation into Wrapper message.
source code
 
_ConvertMapFieldValue(self, value, message, field)
Convert map field value for a message map field.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, ignore_unknown_fields, descriptor_pool)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

ConvertMessage(self, value, message)

source code 
Convert a JSON object into a message.

Args:
  value: A JSON object.
  message: A WKT or regular protocol message to record the data.

Raises:
  ParseError: In case of convert problems.

_ConvertFieldValuePair(self, js, message)

source code 
Convert field value pairs into regular message.

Args:
  js: A JSON object to convert the field value pairs.
  message: A regular protocol message to record the data.

Raises:
  ParseError: In case of problems converting.

_ConvertMapFieldValue(self, value, message, field)

source code 
Convert map field value for a message map field.

Args:
  value: A JSON object to convert the map field value.
  message: A protocol message to record the converted data.
  field: The descriptor of the map field to be converted.

Raises:
  ParseError: In case of convert problems.