com.fasterxml.jackson.core.json

Class JsonWriteContext



  • public class JsonWriteContext
    extends JsonStreamContext
    Extension of JsonStreamContext, which implements core methods needed, and also exposes more complete API to generator implementation classes.
    • Constructor Detail

      • JsonWriteContext

        protected JsonWriteContext(int type,
                        JsonWriteContext parent)
    • Method Detail

      • createChildArrayContext

        public final JsonWriteContext createChildArrayContext()
      • createChildObjectContext

        public final JsonWriteContext createChildObjectContext()
      • getCurrentName

        public final String getCurrentName()
        Description copied from class: JsonStreamContext
        Method for accessing name associated with the current location. Non-null for FIELD_NAME and value events that directly follow field names; null for root level and array values.
        Specified by:
        getCurrentName in class JsonStreamContext
      • writeFieldName

        public final int writeFieldName(String name)
        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

        protected final void appendDesc(StringBuilder sb)
      • toString

        public final String toString()
        Overridden to provide developer writeable "JsonPath" representation of the context.
        Overrides:
        toString in class Object

Copyright © 2012-2014 FasterXML. All Rights Reserved.