Package org.beanio.stream.json
Class JsonParserConfiguration
- java.lang.Object
-
- org.beanio.stream.json.JsonParserConfiguration
-
- Direct Known Subclasses:
JsonRecordParserFactory
public class JsonParserConfiguration extends java.lang.Object
Stores configuration settings for parsing JSON formatted streams.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description JsonParserConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIndentation()
Returns the number of spaces to indent whenpretty
is enabled.java.lang.String
getLineSeparator()
Returns the line separator to use whenpretty
is enabled.boolean
isPretty()
Returns whether JSON output should be formatted prettily.void
setIndentation(int indentation)
Sets the number of spaces to indent whenpretty
is enabled.void
setLineSeparator(java.lang.String lineSeparator)
Sets the line separator to use whenpretty
is enabled.void
setPretty(boolean pretty)
Sets whether to prettily format JSON output.
-
-
-
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 whenpretty
is enabled. Defaults to 2.- Returns:
- the number of spaces
-
setIndentation
public void setIndentation(int indentation)
Sets the number of spaces to indent whenpretty
is enabled.- Parameters:
indentation
- the number of spaces
-
getLineSeparator
public java.lang.String getLineSeparator()
Returns the line separator to use whenpretty
is enabled. Defaults to theline.separator
system property.- Returns:
- the line separator
-
setLineSeparator
public void setLineSeparator(java.lang.String lineSeparator)
Sets the line separator to use whenpretty
is enabled.- Parameters:
lineSeparator
- the line separator
-
-