Class JsonOutputFunctions

java.lang.Object
io.trino.operator.scalar.json.JsonOutputFunctions

public final class JsonOutputFunctions extends Object
Format JSON as binary or character string, using given encoding.

These functions are used to format the output of JSON_QUERY function. In case of error during JSON formatting, the error handling strategy of the enclosing JSON_QUERY function is applied.

Additionally, the options KEEP / OMIT QUOTES [ON SCALAR STRING] are respected when formatting the output.

  • Field Details

  • Method Details

    • jsonToVarchar

      public static io.airlift.slice.Slice jsonToVarchar(com.fasterxml.jackson.databind.JsonNode jsonExpression, long errorBehavior, boolean omitQuotes)
    • jsonToVarbinary

      public static io.airlift.slice.Slice jsonToVarbinary(com.fasterxml.jackson.databind.JsonNode jsonExpression, long errorBehavior, boolean omitQuotes)
    • jsonToVarbinaryUtf8

      public static io.airlift.slice.Slice jsonToVarbinaryUtf8(com.fasterxml.jackson.databind.JsonNode jsonExpression, long errorBehavior, boolean omitQuotes)
    • jsonToVarbinaryUtf16

      public static io.airlift.slice.Slice jsonToVarbinaryUtf16(com.fasterxml.jackson.databind.JsonNode jsonExpression, long errorBehavior, boolean omitQuotes)
    • jsonToVarbinaryUtf32

      public static io.airlift.slice.Slice jsonToVarbinaryUtf32(com.fasterxml.jackson.databind.JsonNode jsonExpression, long errorBehavior, boolean omitQuotes)