Class Tuple.DefaultTupleFormatter

  • All Implemented Interfaces:
    Tuple.TupleFormatter
    Enclosing class:
    Tuple

    public static class Tuple.DefaultTupleFormatter
    extends Object
    implements Tuple.TupleFormatter
    A default formatter that converts each type to String using Java default String conversions. The intent of this formatter is human consumption, not CSV parsing. Special formatting is performed for:
    • Timestamp, via Timestamp.toString()
    • Blobs, displayed in their entirety as Strings (using US-ASCII characters, or the charset declared via the streambase.tuple-charset system property)
    • Tuples, displayed as a comma-separated string of each of its field's stringification using this formatter
    • Lists, displayed as a [] enclosed string of each element stringified using this formatter, delimited by comma
    • Functions, displayed using a JSON syntax
    • Null values, returned as Tuple.NULL_STRING

    A shared instance is available at Tuple.getTupleFormatter().

    Since:
    7.1 this formatter is now used recursively for list elements and tuple sub-fields