Provide serialization and de-serialization of different formats based on Google’s protobuf Message. Enables overriding the default (byte array) output to text based formats such as XML, JSON and HTML.
BSD 3-Clause "New" or "Revised" License
153
stars
97
forks
source link
JsonFormat.merge throw a exception when a 'message' field in json is null #58
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