This patch implements the JSON encoder and decoder for C++. The design is very similar to that of Java implementation. The patch is incomplete in two respects:
- The decoder does not resolve schema. The Java implementation extends validating decoder to support resolution. I'll submit that as a separate patch.
- The decoder and encoder do not handle recursive schema. They throw when a recursive schema is encountered. Again, I'll address this separately.
Instead of modifying the existing interface, I added two new interfaces Encoder and Decoder in the same lines as Java. So none of the existing applications will have trouble.
The new implementation uses the buffers and validSchema which we already have.
As a side benefit there are binary encoder/decoder and validating encoder/decoder using the new interface.
The new implementation is rigorously tested using the same test cases as that of Java.
This patch may have conflicts with
AVRO-700. I'll take care of them once AVRO-700 is done.