Class JsonFunctions.Get

java.lang.Object
org.apache.juneau.commons.svl.TypedFunction
org.apache.juneau.commons.svl.functions.JsonFunctions.Get
All Implemented Interfaces:
VarFunction
Enclosing class:
JsonFunctions

public static class JsonFunctions.Get extends TypedFunction
#{get(json, key)} — extracts json[key] (object) or json[index] (array, when key parses as int).
  • Constructor Details

    • Get

      public Get()
  • Method Details

    • name

      public String name()
      Description copied from interface: VarFunction
      The function's invocation name as it appears between #{} and the opening parenthesis in the template. Must consist of ASCII letters, digits, and underscores; must begin with a letter.
      Returns:
      The invocation name. Never null or empty.
    • invoke

      public String invoke(String json, String key)