protobuf-java-format
protobuf-java-format copied to clipboard
JsonFormat.merge throw a exception when a 'message' field in json is null
message A { //xxx } message B { optional A a=0; }
B.Builder builder = B.newBuild(); new JsonFormat().merge("{a: null}", ExtensionRegistry.getEmptyRegistry(), builder);
Will throw exception like Exception in thread "main" com.googlecode.protobuf.format.JsonFormat$ParseException: 1:13: Expected "{"
version 1.4
这个问题你解决了吗?是不是要换低版本包,我可能也遇到同样问题了,json转proto报一样的错误