Class JsonParserConfiguration

  • Direct Known Subclasses:
    JsonRecordParserFactory

    public class JsonParserConfiguration
    extends java.lang.Object
    Stores configuration settings for parsing JSON formatted streams.
    Since:
    2.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getIndentation()
      Returns the number of spaces to indent when pretty is enabled.
      java.lang.String getLineSeparator()
      Returns the line separator to use when pretty is enabled.
      boolean isPretty()
      Returns whether JSON output should be formatted prettily.
      void setIndentation​(int indentation)
      Sets the number of spaces to indent when pretty is enabled.
      void setLineSeparator​(java.lang.String lineSeparator)
      Sets the line separator to use when pretty is enabled.
      void setPretty​(boolean pretty)
      Sets whether to prettily format JSON output.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JsonParserConfiguration

        public JsonParserConfiguration()
    • Method Detail

      • isPretty

        public boolean isPretty()
        Returns whether JSON output should be formatted prettily.
        Returns:
        true to format JSON output, false otherwise
      • setPretty

        public void setPretty​(boolean pretty)
        Sets whether to prettily format JSON output.
        Parameters:
        pretty - true to format JSON output, false otherwise
      • getIndentation

        public int getIndentation()
        Returns the number of spaces to indent when pretty is enabled. Defaults to 2.
        Returns:
        the number of spaces
      • setIndentation

        public void setIndentation​(int indentation)
        Sets the number of spaces to indent when pretty is enabled.
        Parameters:
        indentation - the number of spaces
      • getLineSeparator

        public java.lang.String getLineSeparator()
        Returns the line separator to use when pretty is enabled. Defaults to the line.separator system property.
        Returns:
        the line separator
      • setLineSeparator

        public void setLineSeparator​(java.lang.String lineSeparator)
        Sets the line separator to use when pretty is enabled.
        Parameters:
        lineSeparator - the line separator