This replaces the previous ros1msg parser with a generic parser implemented under the schema package. In addition, the patch builds a JSON transcoder on top of this parser.
The main idea of this patch is to rearchitect our message parsing infrastructure to prepare for extensibility. Prior to this commit, we used a ros1msg-specific JSON transcoder and parser, and extending supported encoding types would have required us to implement new transcoders and parsers for each supported type.
The parser is implemented using a bytecode VM and is capable of parsing only a requested field/subfield of a message. We compile the addressed schema + requested set of fields into a program encoding parse and skip operations, which will also terminate after all requested fields are satisfied.
For protobuf, there will be a snag in that protobuf messages are unordered and compliant parsers must parse all fields just to return one. I suspect however that the protobuf messages we deal with are serialized in order and can be optimized.
This replaces the previous ros1msg parser with a generic parser implemented under the schema package. In addition, the patch builds a JSON transcoder on top of this parser.
The main idea of this patch is to rearchitect our message parsing infrastructure to prepare for extensibility. Prior to this commit, we used a ros1msg-specific JSON transcoder and parser, and extending supported encoding types would have required us to implement new transcoders and parsers for each supported type.
The parser is implemented using a bytecode VM and is capable of parsing only a requested field/subfield of a message. We compile the addressed schema + requested set of fields into a program encoding parse and skip operations, which will also terminate after all requested fields are satisfied.
For protobuf, there will be a snag in that protobuf messages are unordered and compliant parsers must parse all fields just to return one. I suspect however that the protobuf messages we deal with are serialized in order and can be optimized.