Class JsonMarshallingContext
- java.lang.Object
-
- org.beanio.internal.parser.ParsingContext
-
- org.beanio.internal.parser.MarshallingContext
-
- org.beanio.internal.parser.format.json.JsonMarshallingContext
-
public class JsonMarshallingContext extends MarshallingContext
AMarshallingContext
for JSON formatted streams.- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from class org.beanio.internal.parser.ParsingContext
MARSHALLING, UNMARSHALLING
-
-
Constructor Summary
Constructors Constructor Description JsonMarshallingContext(int maxDepth)
Constructs a newJsonMarshallingContext
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear is invoked after each bean object (record or group) is marshalled.protected java.lang.Object
getRecordObject()
Returns the record object to pass to theRecordWriter
whenMarshallingContext.writeRecord()
is called.void
pop()
void
push(JsonNode type)
void
put(JsonNode type, java.lang.Object value)
-
Methods inherited from class org.beanio.internal.parser.MarshallingContext
getBean, getComponentName, getMode, getRecordWriter, getTextLengthCounter, setBean, setComponentName, setRecordWriter, toArray, toDocument, toList, writeRecord
-
Methods inherited from class org.beanio.internal.parser.ParsingContext
createHeap, getAdjustedFieldPosition, getLocal, getRelativeFieldIndex, isRepeating, popIteration, pushIteration, setLocal
-
-
-
-
Constructor Detail
-
JsonMarshallingContext
public JsonMarshallingContext(int maxDepth)
Constructs a newJsonMarshallingContext
.- Parameters:
maxDepth
- the maximum depth of the allJsonWrapper
components in the parser tree layout.
-
-
Method Detail
-
getRecordObject
protected java.lang.Object getRecordObject()
Description copied from class:MarshallingContext
Returns the record object to pass to theRecordWriter
whenMarshallingContext.writeRecord()
is called.- Specified by:
getRecordObject
in classMarshallingContext
- Returns:
- the record object
-
clear
public void clear()
Description copied from class:MarshallingContext
Clear is invoked after each bean object (record or group) is marshalled.- Overrides:
clear
in classMarshallingContext
-
push
public void push(JsonNode type)
- Parameters:
type
-
-
pop
public void pop()
-
put
public void put(JsonNode type, java.lang.Object value)
- Parameters:
type
-value
-
-
-