Package com.daveayan.transformers

Examples of com.daveayan.transformers.Context


  }
 
  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()) {
View Full Code Here


    log.debug("Converting to json " + object);
    if(object instanceof String) {
      return object.toString();
    }
    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.debug("json before formatting is : " + json_buffer.toString());
    String json = json_buffer.toString();
    if(formatJson()) {
      json = RjsonUtil.reformat(json_buffer.toString());
View Full Code Here

  }
 
  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()) {
View Full Code Here

  }
 
  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()) {
View Full Code Here

  }
 
  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()) {
View Full Code Here

TOP

Related Classes of com.daveayan.transformers.Context

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.