BeanIO 2.0.4

org.beanio.internal.parser.format.json
Class JsonMarshallingContext

java.lang.Object
  extended by org.beanio.internal.parser.ParsingContext
      extended by org.beanio.internal.parser.MarshallingContext
          extended by org.beanio.internal.parser.format.json.JsonMarshallingContext

public class JsonMarshallingContext
extends MarshallingContext

A MarshallingContext for JSON formatted streams.

Since:
2.0
Author:
Kevin Seim

Field Summary
 
Fields inherited from class org.beanio.internal.parser.ParsingContext
MARSHALLING, UNMARSHALLING
 
Constructor Summary
JsonMarshallingContext(int maxDepth)
          Constructs a new JsonMarshallingContext.
 
Method Summary
 void clear()
          Clear is invoked after each record is marshalled.
protected  Object getRecordObject()
          Returns the record object to pass to the RecordWriter when MarshallingContext.writeRecord() is called.
 void pop()
           
 void push(JsonNode type)
           
 void put(JsonNode type, Object value)
           
 
Methods inherited from class org.beanio.internal.parser.MarshallingContext
getBean, getComponentName, getMode, getRecordWriter, setBean, setComponentName, setRecordWriter, toArray, toDocument, toList, writeRecord
 
Methods inherited from class org.beanio.internal.parser.ParsingContext
createHeap, getAdjustedFieldPosition, getLocal, getRelativeFieldIndex, isRepeating, popIteration, pushIteration, setLocal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonMarshallingContext

public JsonMarshallingContext(int maxDepth)
Constructs a new JsonMarshallingContext.

Parameters:
maxDepth - the maximum depth of the all JsonWrapper components in the parser tree layout.
Method Detail

getRecordObject

protected Object getRecordObject()
Description copied from class: MarshallingContext
Returns the record object to pass to the RecordWriter when MarshallingContext.writeRecord() is called.

Specified by:
getRecordObject in class MarshallingContext
Returns:
the record object

clear

public void clear()
Description copied from class: MarshallingContext
Clear is invoked after each record is marshalled.

Overrides:
clear in class MarshallingContext

push

public void push(JsonNode type)
Parameters:
type -

pop

public void pop()

put

public void put(JsonNode type,
                Object value)
Parameters:
type -
value -

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim