encode json to protobuf