APISonar


com.jayway.jsonpath.DocumentContext.json

> com > jayway > jsonpath > DocumentContext > json
com APIs jayway APIs jsonpath APIs DocumentContext APIs json APIs

Example 1
public List getAsList() {
        switch (type) {
            case LIST:
                return getValue(List.class);
            case JSON:
                DocumentContext doc = (DocumentContext) value;
                return doc.json();
            default:
                throw new RuntimeException("cannot convert to list: " + this);
        }
    }
Example 2
private final DocumentContext doc;

    private Json(DocumentContext doc) {
        this.doc = doc;
        array = (doc.json() instanceof List);
        prefix = array ? "$" : "$.";
    }