public static void fromJSON(String json, Message.Builder targetBuilder) throws IOException {
        JsonFormat.parser()
                  .usingTypeRegistry(
                      JsonFormat.TypeRegistry.newBuilder()
                                             .add(targetBuilder.getDescriptorForType())
                                             .build())
                  .ignoringUnknownFields()
                  .merge(json, targetBuilder);
    }
Extract data from a JSON String and use them to construct a Protocol Buffers Message.

@param json          A JSON data string to parse
@param targetBuilder A Message builder to use to construct the resulting Message
@throws com.google.protobuf.InvalidProtocolBufferException Thrown in case of invalid Message data
oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/ProtoBufJsonUtils.java