/** * Retrieves the literal value * * @param literal JmesPath literal type * @param input Input json node against which evaluation is done * @return Literal value */ @Override public JsonNode visit(JmesPathLiteral literal, JsonNode input) { return literal.getValue(); }
private static JmesPathExpression jsonToLiteral(JsonNode jsonNode) { return new JmesPathLiteral(jsonNode.get("value")); }
/** * Generates the code for a new JmesPathLiteral. * * @param literal JmesPath literal type * @param aVoid void * @return String that represents a call to * the new literal expression */ @Override public String visit(final JmesPathLiteral literal, final Void aVoid) { return "new JmesPathLiteral(\"" + StringEscapeUtils .escapeJava(literal.getValue().toString()) + "\")"; }
private static JmesPathExpression jsonToLiteral(JsonNode jsonNode) { return new JmesPathLiteral(jsonNode.get("value")); }
/** * Retrieves the literal value * * @param literal JmesPath literal type * @param input Input json node against which evaluation is done * @return Literal value */ @Override public JsonNode visit(JmesPathLiteral literal, JsonNode input) { return literal.getValue(); }
/** * Retrieves the literal value * * @param literal JmesPath literal type * @param input Input json node against which evaluation is done * @return Literal value */ @Override public JsonNode visit(JmesPathLiteral literal, JsonNode input) { return literal.getValue(); }
/** * Generates the code for a new JmesPathLiteral. * * @param literal JmesPath literal type * @param aVoid void * @return String that represents a call to * the new literal expression */ @Override public String visit(final JmesPathLiteral literal, final Void aVoid) { return "new JmesPathLiteral(\"" + StringEscapeUtils .escapeJava(literal.getValue().toString()) + "\")"; }