public static GsonBuilder createGson() {
    return new GsonBuilder().setLongSerializationPolicy(LongSerializationPolicy.STRING)
      .registerTypeAdapter(LongAdder.class, new TypeAdapter<LongAdder>() {

        @Override
        public void write(JsonWriter out, LongAdder value) throws IOException {
          out.value(value.longValue());
        }

        @Override
        public LongAdder read(JsonReader in) throws IOException {
          LongAdder value = new LongAdder();
          value.add(in.nextLong());
          return value;
        }
      });
  }
Create a builder which is used to create a Gson instance.
<p/>
Will set some common configs for the builder.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/GsonUtil.java