Package com.firefly.utils.io

Examples of com.firefly.utils.io.StringWriter


import com.firefly.utils.io.StringWriter;

public abstract class Json {
  public static String toJson(Object obj) {
    String ret = null;
    StringWriter stringWriter = new StringWriter();
    try {
      ret = new JsonSerializer(stringWriter).toJson(obj).toString();
    } catch (IOException e) {
      e.printStackTrace();
    } finally {
      stringWriter.close();
    }
    return ret;
  }
View Full Code Here

TOP

Related Classes of com.firefly.utils.io.StringWriter

Copyright © 2018 www.massapicom. 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.