Examples of PathCapturingJSONWriterWrapper


Examples of org.codehaus.groovy.grails.web.json.PathCapturingJSONWriterWrapper

        writer = prettyPrint ? new PrettyPrintJSONWriter(out) : new JSONWriter(out);
        if (circularReferenceBehaviour == CircularReferenceBehaviour.PATH) {
            if (log.isInfoEnabled()) {
                log.info(String.format("Using experimental CircularReferenceBehaviour.PATH for %s", getClass().getName()));
            }
            writer = new PathCapturingJSONWriterWrapper(writer);
        }
        referenceStack = new Stack<Object>();
    }
View Full Code Here

Examples of org.codehaus.groovy.grails.web.json.PathCapturingJSONWriterWrapper

                break;
            case PATH:
                Map<String, Object> props = new HashMap<String, Object>();
                props.put("class", o.getClass());
                int idx = referenceStack.indexOf(o);
                PathCapturingJSONWriterWrapper pcWriter = (PathCapturingJSONWriterWrapper) writer;
                props.put("ref", String.format("root%s", pcWriter.getStackReference(idx)));
                value(props);
                break;
            case IGNORE:
                break;
        }
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.