fix bug for pb2json, implement json2pb