Esempio n. 1
0
 /**
  * Converts {@code value} to a JSON tree.
  *
  * @param value the Java object to convert. May be null.
  * @return the converted JSON tree. May be {@link JsonNull}.
  */
 /*public*/ final JsonElement toJsonTree(T value) {
   try {
     JsonTreeWriter jsonWriter = new JsonTreeWriter();
     jsonWriter.setLenient(true);
     write(jsonWriter, value);
     return jsonWriter.get();
   } catch (IOException e) {
     throw new JsonIOException(e);
   }
 }