JsonUtils { public static <T> String serialize(T object) { return mGson.toJson(object); }  static String serialize(T object); static T deserialize(String json, Class<T> clz); static T deserialize(JsonObject json, Class<T> clz); static T deserialize(String json, Type type);  }
@Test public void testSerialize() throws Exception { assertEquals("{\"name\":\"Lauren\",\"sex\":\"男\"}", JsonUtils.serialize(new User("Lauren", "男"))); }