BeanIO 2.0.4

org.beanio.stream.json
Class JsonParserConfiguration

java.lang.Object
  extended by org.beanio.stream.json.JsonParserConfiguration
Direct Known Subclasses:
JsonRecordParserFactory

public class JsonParserConfiguration
extends Object

Stores configuration settings for parsing JSON formatted streams.

Since:
2.0
Author:
Kevin Seim

Constructor Summary
JsonParserConfiguration()
          Constructs a new JsonParserConfiguration>
 
Method Summary
 int getIndentation()
          Returns the number of spaces to indent when pretty is enabled.
 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(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()
Constructs a new 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 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(String lineSeparator)
Sets the line separator to use when pretty is enabled.

Parameters:
lineSeparator - the line separator

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim