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.ObjectStores 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 intgetIndentation()Returns the number of spaces to indent whenprettyis enabled.java.lang.StringgetLineSeparator()Returns the line separator to use whenprettyis enabled.booleanisPretty()Returns whether JSON output should be formatted prettily.voidsetIndentation(int indentation)Sets the number of spaces to indent whenprettyis enabled.voidsetLineSeparator(java.lang.String lineSeparator)Sets the line separator to use whenprettyis enabled.voidsetPretty(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 whenprettyis enabled. Defaults to 2.- Returns:
- the number of spaces
-
setIndentation
public void setIndentation(int indentation)
Sets the number of spaces to indent whenprettyis enabled.- Parameters:
indentation- the number of spaces
-
getLineSeparator
public java.lang.String getLineSeparator()
Returns the line separator to use whenprettyis enabled. Defaults to theline.separatorsystem property.- Returns:
- the line separator
-
setLineSeparator
public void setLineSeparator(java.lang.String lineSeparator)
Sets the line separator to use whenprettyis enabled.- Parameters:
lineSeparator- the line separator
-
-