Package org.codehaus.jackson.impl
Class JsonWriteContext
java.lang.Object
org.codehaus.jackson.JsonStreamContext
org.codehaus.jackson.impl.JsonWriteContext
Extension of
JsonStreamContext
, which implements
core methods needed, and also exposes
more complete API to generator implementation classes.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JsonWriteContext
protected String
Name of the field of which value is to be parsed; only used for OBJECT contextsprotected final JsonWriteContext
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class org.codehaus.jackson.JsonStreamContext
_index, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
final JsonWriteContext
final JsonWriteContext
static JsonWriteContext
final String
Method for accessing name associated with the current location.final JsonWriteContext
Accessor for finding parent context of this context; will return null for root context.final String
toString()
Overridden to provide developer writeable "JsonPath" representation of the context.final int
writeFieldName
(String name) Method that writer is to call before it writes a field name.final int
Methods inherited from class org.codehaus.jackson.JsonStreamContext
getCurrentIndex, getEntryCount, getTypeDesc, inArray, inObject, inRoot
-
Field Details
-
STATUS_OK_AS_IS
public static final int STATUS_OK_AS_IS- See Also:
-
STATUS_OK_AFTER_COMMA
public static final int STATUS_OK_AFTER_COMMA- See Also:
-
STATUS_OK_AFTER_COLON
public static final int STATUS_OK_AFTER_COLON- See Also:
-
STATUS_OK_AFTER_SPACE
public static final int STATUS_OK_AFTER_SPACE- See Also:
-
STATUS_EXPECT_VALUE
public static final int STATUS_EXPECT_VALUE- See Also:
-
STATUS_EXPECT_NAME
public static final int STATUS_EXPECT_NAME- See Also:
-
_parent
-
_currentName
Name of the field of which value is to be parsed; only used for OBJECT contexts -
_child
-
-
Constructor Details
-
JsonWriteContext
-
-
Method Details
-
createRootContext
-
createChildArrayContext
-
createChildObjectContext
-
getParent
Description copied from class:JsonStreamContext
Accessor for finding parent context of this context; will return null for root context.- Specified by:
getParent
in classJsonStreamContext
-
getCurrentName
Description copied from class:JsonStreamContext
Method for accessing name associated with the current location. Non-null forFIELD_NAME
and value events that directly follow field names; null for root level and array values.- Specified by:
getCurrentName
in classJsonStreamContext
-
writeFieldName
Method that writer is to call before it writes a field name.- Returns:
- Index of the field entry (0-based)
-
writeValue
public final int writeValue() -
appendDesc
-
toString
Overridden to provide developer writeable "JsonPath" representation of the context.
-