List of usage examples for com.fasterxml.jackson.core JsonPointer compile
public static JsonPointer compile(String input) throws IllegalArgumentException
From source file:com.reprezen.swagedit.model.Model.java
/** * Returns the model's root node. * * @return node */ public AbstractNode getRoot() { return nodes.get(JsonPointer.compile("")); }
From source file:com.reprezen.swagedit.model.Model.java
/** * Returns the pointer for the node whose content is at the position specified by a line and column. * /*from www . j a v a 2 s . c o m*/ * @param line * @param column * @return */ public JsonPointer getPath(int line, int column) { AbstractNode node = getNode(line, column); if (node != null) { return node.getPointer(); } return JsonPointer.compile(""); }
From source file:com.reprezen.swagedit.schema.SwaggerSchema.java
protected JsonPointer pointer(String href) { if (href.startsWith("#")) { return JsonPointer.compile(href.substring(1)); } else if (href.startsWith("/")) { return JsonPointer.compile(href); } else {// w w w . j av a2s .c o m String[] split = href.split("#"); return split.length > 1 ? JsonPointer.compile(split[1]) : null; } }