Package org.jtester.json.decoder

Examples of org.jtester.json.decoder.JSONDecoder.decode()


  public static final <T> T toObject(JSONObject json, Class clazz, Map<String, Object> references) {
    if (clazz == null) {
      throw new RuntimeException("the decode class can't be null.");
    }
    JSONDecoder decoder = JSONDecoder.get(clazz);
    Object obj = decoder.decode(json, references);
    return (T) obj;
  }

  /**
   * 将对象编码为json串
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.