BeanIO 2.0.4

org.beanio.internal.parser.format.json
Interface JsonNode

All Known Implementing Classes:
JsonFieldFormat, JsonWrapper

public interface JsonNode

An interface implemented by any JSON segment or field.

Since:
2.0
Author:
Kevin Seim

Field Summary
static char ARRAY
          JSON array type
static char BOOLEAN
          JSON boolean type
static char NUMBER
          JSON number type
static char OBJECT
          JSON object type
static char STRING
          JSON string type
 
Method Summary
 int getJsonArrayIndex()
          Returns the index of this node in its parent array, or -1 if not applicable (i.e.
 String getJsonName()
          Returns the JSON field name.
 char getJsonType()
          Returns the type of node.
 String getName()
          Returns the field name.
 boolean isJsonArray()
          Returns whether this node is a JSON array.
 boolean isNillable()
          Returns whether this node may be explicitly set to null.
 

Field Detail

OBJECT

static final char OBJECT
JSON object type

See Also:
Constant Field Values

ARRAY

static final char ARRAY
JSON array type

See Also:
Constant Field Values

STRING

static final char STRING
JSON string type

See Also:
Constant Field Values

NUMBER

static final char NUMBER
JSON number type

See Also:
Constant Field Values

BOOLEAN

static final char BOOLEAN
JSON boolean type

See Also:
Constant Field Values
Method Detail

getName

String getName()
Returns the field name.

Returns:
the field name

getJsonName

String getJsonName()
Returns the JSON field name.

Returns:
the JSON field name

getJsonType

char getJsonType()
Returns the type of node. If isJsonArray() is true, this method returns the component type of the array.

Returns:
the node type

isJsonArray

boolean isJsonArray()
Returns whether this node is a JSON array.

Returns:
true if this node a JSON array, false otherwise

getJsonArrayIndex

int getJsonArrayIndex()
Returns the index of this node in its parent array, or -1 if not applicable (i.e. its parent is an object).

Returns:
the index of this node in its parent array

isNillable

boolean isNillable()
Returns whether this node may be explicitly set to null.

Returns:
true if this node value may be set to null, false otherwise

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim