Adding a pbToJson function

You are right @jchiu that they are just traversals. The difference is in how we build the outputs. Since proto output has a schema(there are nodes which have properties) vs JSON which doesn’t have any inherent schema. The output we want for JSON has attributes(e.g friends, name etc.) as keys.

Have a look at Protocol buffer vs JSON time graphs - #10 by pawan to have a look at the equivalent JSON output for protocol buffer which I generated using jsonpb package - github.com/golang/protobuf/jsonpb - Go Packages.

I definitely agree that we should have just one function and generate an intermediate structure. I couldn’t find a better way to do it apart from what I proposed here.