Package org.entur.jackson.tools.jsh
Class SyntaxHighlightingJsonGenerator
java.lang.Object
tools.jackson.core.JsonGenerator
tools.jackson.core.util.JsonGeneratorDelegate
org.entur.jackson.tools.jsh.SyntaxHighlightingJsonGenerator
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable,tools.jackson.core.Versioned
public class SyntaxHighlightingJsonGenerator
extends tools.jackson.core.util.JsonGeneratorDelegate
Syntax highlighting JsonGenerator wrapper.
Always uses the same highlighting colors.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SyntaxHighlighterIndenterprotected SyntaxHighlighterIndenterprotected SyntaxHighlightingPrettyPrinterprotected SyntaxHighlighterFields inherited from class tools.jackson.core.util.JsonGeneratorDelegate
delegate, delegateCopyMethods -
Constructor Summary
ConstructorsConstructorDescriptionSyntaxHighlightingJsonGenerator(tools.jackson.core.JsonGenerator d, SyntaxHighlightingPrettyPrinter prettyPrinter, SyntaxHighlighterIndenter objectIndenter, SyntaxHighlighterIndenter arrayIndenter, SyntaxHighlighter syntaxHighlighter) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()create(tools.jackson.core.JsonGenerator jsonGenerator) create(tools.jackson.core.JsonGenerator jsonGenerator, TokenStreamContextListener listener) tools.jackson.core.JsonGeneratorwriteArray(double[] array, int offset, int length) tools.jackson.core.JsonGeneratorwriteArray(int[] array, int offset, int length) tools.jackson.core.JsonGeneratorwriteArray(long[] array, int offset, int length) tools.jackson.core.JsonGeneratorwriteBinary(tools.jackson.core.Base64Variant b64variant, byte[] data, int offset, int len) intwriteBinary(tools.jackson.core.Base64Variant b64variant, InputStream data, int dataLength) tools.jackson.core.JsonGeneratorwriteBoolean(boolean value) tools.jackson.core.JsonGeneratortools.jackson.core.JsonGeneratorwriteName(tools.jackson.core.SerializableString name) tools.jackson.core.JsonGeneratortools.jackson.core.JsonGeneratorwriteNumber(double v) tools.jackson.core.JsonGeneratorwriteNumber(float v) tools.jackson.core.JsonGeneratorwriteNumber(int v) tools.jackson.core.JsonGeneratorwriteNumber(long v) tools.jackson.core.JsonGeneratorwriteNumber(short v) tools.jackson.core.JsonGeneratorwriteNumber(String encodedValue) tools.jackson.core.JsonGeneratortools.jackson.core.JsonGeneratortools.jackson.core.JsonGeneratorwritePropertyId(long id) tools.jackson.core.JsonGeneratorwriteRawUTF8String(byte[] bytes, int offset, int length) tools.jackson.core.JsonGeneratorwriteString(char[] text, int offset, int len) tools.jackson.core.JsonGeneratorwriteString(Reader reader, int len) tools.jackson.core.JsonGeneratorwriteString(String value) tools.jackson.core.JsonGeneratorwriteString(tools.jackson.core.SerializableString text) tools.jackson.core.JsonGeneratorwriteUTF8String(byte[] text, int offset, int length) Methods inherited from class tools.jackson.core.util.JsonGeneratorDelegate
assignCurrentValue, canOmitProperties, canWriteObjectId, canWriteTypeId, configure, copyCurrentEvent, copyCurrentStructure, currentValue, delegate, flush, getCharacterEscapes, getHighestNonEscapedChar, getPrettyPrinter, getSchema, has, isClosed, isEnabled, objectWriteContext, streamWriteCapabilities, streamWriteContext, streamWriteFeatures, streamWriteOutputBuffered, streamWriteOutputTarget, version, writeArray, writeEmbeddedObject, writeEndArray, writeEndObject, writeNumber, writeObjectId, writeObjectRef, writeOmittedProperty, writePOJO, writeRaw, writeRaw, writeRaw, writeRaw, writeRaw, writeRawValue, writeRawValue, writeRawValue, writeStartArray, writeStartArray, writeStartArray, writeStartObject, writeStartObject, writeStartObject, writeTree, writeTypeIdMethods inherited from class tools.jackson.core.JsonGenerator
_constructWriteException, _constructWriteException, _constructWriteException, _constructWriteException, _copyCurrentContents, _copyCurrentContentsExact, _copyCurrentFloatValue, _copyCurrentFloatValueExact, _copyCurrentIntValue, _copyCurrentStringValue, _reportArgumentError, _reportError, _reportUnsupportedOperation, _reportUnsupportedOperation, _verifyOffsets, _wrapIOFailure, _writeTypePrefixUsingNative, _writeTypePrefixUsingWrapper, copyCurrentEventExact, copyCurrentStructureExact, setCharacterEscapes, streamWriteConstraints, writeArrayPropertyStart, writeBinary, writeBinary, writeBinary, writeBinaryProperty, writeBooleanProperty, writeNullProperty, writeNumberProperty, writeNumberProperty, writeNumberProperty, writeNumberProperty, writeNumberProperty, writeNumberProperty, writeNumberProperty, writeObjectPropertyStart, writePOJOProperty, writeRawValue, writeStringProperty, writeTypePrefix, writeTypeSuffix
-
Field Details
-
prettyPrinter
-
objectIndenter
-
arrayIndenter
-
syntaxHighlighter
-
-
Constructor Details
-
SyntaxHighlightingJsonGenerator
public SyntaxHighlightingJsonGenerator(tools.jackson.core.JsonGenerator d, SyntaxHighlightingPrettyPrinter prettyPrinter, SyntaxHighlighterIndenter objectIndenter, SyntaxHighlighterIndenter arrayIndenter, SyntaxHighlighter syntaxHighlighter)
-
-
Method Details
-
create
public static SyntaxHighlightingJsonGenerator create(tools.jackson.core.JsonGenerator jsonGenerator) -
create
public static SyntaxHighlightingJsonGenerator create(tools.jackson.core.JsonGenerator jsonGenerator, TokenStreamContextListener listener) -
writeName
public tools.jackson.core.JsonGenerator writeName(String value) throws tools.jackson.core.JacksonException - Overrides:
writeNamein classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeName
public tools.jackson.core.JsonGenerator writeName(tools.jackson.core.SerializableString name) throws tools.jackson.core.JacksonException - Overrides:
writeNamein classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writePropertyId
public tools.jackson.core.JsonGenerator writePropertyId(long id) throws tools.jackson.core.JacksonException - Overrides:
writePropertyIdin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeArray
public tools.jackson.core.JsonGenerator writeArray(int[] array, int offset, int length) throws tools.jackson.core.JacksonException - Overrides:
writeArrayin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeArray
public tools.jackson.core.JsonGenerator writeArray(long[] array, int offset, int length) throws tools.jackson.core.JacksonException - Overrides:
writeArrayin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeArray
public tools.jackson.core.JsonGenerator writeArray(double[] array, int offset, int length) throws tools.jackson.core.JacksonException - Overrides:
writeArrayin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeBinary
public tools.jackson.core.JsonGenerator writeBinary(tools.jackson.core.Base64Variant b64variant, byte[] data, int offset, int len) throws tools.jackson.core.JacksonException - Overrides:
writeBinaryin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeBinary
public int writeBinary(tools.jackson.core.Base64Variant b64variant, InputStream data, int dataLength) throws tools.jackson.core.JacksonException - Overrides:
writeBinaryin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeNumber
public tools.jackson.core.JsonGenerator writeNumber(short v) throws tools.jackson.core.JacksonException - Overrides:
writeNumberin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeNumber
public tools.jackson.core.JsonGenerator writeNumber(int v) throws tools.jackson.core.JacksonException - Overrides:
writeNumberin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeNumber
public tools.jackson.core.JsonGenerator writeNumber(long v) throws tools.jackson.core.JacksonException - Overrides:
writeNumberin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeNumber
public tools.jackson.core.JsonGenerator writeNumber(BigInteger v) throws tools.jackson.core.JacksonException - Overrides:
writeNumberin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeNumber
public tools.jackson.core.JsonGenerator writeNumber(double v) throws tools.jackson.core.JacksonException - Overrides:
writeNumberin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeNumber
public tools.jackson.core.JsonGenerator writeNumber(float v) throws tools.jackson.core.JacksonException - Overrides:
writeNumberin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeNumber
public tools.jackson.core.JsonGenerator writeNumber(BigDecimal v) throws tools.jackson.core.JacksonException - Overrides:
writeNumberin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeNumber
public tools.jackson.core.JsonGenerator writeNumber(String encodedValue) throws tools.jackson.core.JacksonException, UnsupportedOperationException - Overrides:
writeNumberin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonExceptionUnsupportedOperationException
-
writeBoolean
public tools.jackson.core.JsonGenerator writeBoolean(boolean value) throws tools.jackson.core.JacksonException - Overrides:
writeBooleanin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeNull
public tools.jackson.core.JsonGenerator writeNull() throws tools.jackson.core.JacksonException- Overrides:
writeNullin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeString
public tools.jackson.core.JsonGenerator writeString(String value) throws tools.jackson.core.JacksonException - Overrides:
writeStringin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeString
public tools.jackson.core.JsonGenerator writeString(Reader reader, int len) throws tools.jackson.core.JacksonException - Overrides:
writeStringin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeString
public tools.jackson.core.JsonGenerator writeString(char[] text, int offset, int len) throws tools.jackson.core.JacksonException - Overrides:
writeStringin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeString
public tools.jackson.core.JsonGenerator writeString(tools.jackson.core.SerializableString text) throws tools.jackson.core.JacksonException - Overrides:
writeStringin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeRawUTF8String
public tools.jackson.core.JsonGenerator writeRawUTF8String(byte[] bytes, int offset, int length) throws tools.jackson.core.JacksonException - Overrides:
writeRawUTF8Stringin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
writeUTF8String
public tools.jackson.core.JsonGenerator writeUTF8String(byte[] text, int offset, int length) throws tools.jackson.core.JacksonException - Overrides:
writeUTF8Stringin classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-
close
public void close() throws tools.jackson.core.JacksonException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classtools.jackson.core.util.JsonGeneratorDelegate- Throws:
tools.jackson.core.JacksonException
-