public static Object toJavaObject(MessageOrBuilder messageOrBuilder)
    throws InvalidProtocolBufferException {
    JsonElement element = toJsonElement(messageOrBuilder);
    return toJavaObject(element);
  }
This class converts PB Messages to various representations, like:
<ul>
<li>JSON string: {@link #toJsonElement(MessageOrBuilder)}</li>
<li>JSON object (gson): {@link #toJsonElement(MessageOrBuilder)}</li>
<li>Java objects (Boolean, Number, String, List, Map): {@link #toJavaObject(JsonElement)}</li>
</ul>
hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufMessageConverter.java