Class JSONCountFormatter


  • public class JSONCountFormatter
    extends JSONFormatter
    A formatter that presents count results as JSON.
    Author:
    Alex Kalderimis
    • Constructor Detail

      • JSONCountFormatter

        public JSONCountFormatter()
    • Method Detail

      • formatResult

        public java.lang.String formatResult​(java.util.List<java.lang.String> resultRow)
        Description copied from class: JSONFormatter
        In normal cases a list with a single JSON string item is expected. But just in case, this formatter will simply join any strings it gets given, delimiting with a comma. It is the responsibility of whoever is feeding me these lines to add any necessary commas between them.
        Overrides:
        formatResult in class JSONFormatter
        Parameters:
        resultRow - the row as a list of strings
        Returns:
        A formatted result line, or the empty string if the row is empty
        See Also:
        Formatter.formatResult(java.util.List)