Package rjson.printer

Examples of rjson.printer.StringBufferPrinter


    return null;
  }
 
  public String toJson(Object object) {
    log.info("Converting to json " + object);
    StringBufferPrinter json_buffer = new StringBufferPrinter();
    Context context = Context.newInstance().put("rjson", this).and("json_buffer", json_buffer).and("cycle_set", new SoftReference<Set<?>>(new HashSet<Object>()));
    object_to_json_transformer.transform(object, String.class, context);
    log.info("json before formatting is : " + json_buffer.toString());
//    return json_buffer.toString();
    String json = json_buffer.toString();
    if(formatJson()) {
      json = RjsonUtil.reformat(json_buffer.toString());
    }
    log.info("json is : " + json);
    return json;
  }
View Full Code Here

TOP

Related Classes of rjson.printer.StringBufferPrinter

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.