ThreadLocal
contains a {@link java.lang.ref.SoftRerefence}
* to a byte array used for holding content to decode
*/
final protected static ThreadLocalmByteBufferEnd
*/
protected int _inputPtr;
/**
* Pointed to the end marker, that is, position one after the last
* valid available byte.
*/
protected int _inputEnd;
/**
* Decoded first character of a surrogate pair, if one needs to be buffered
*/
protected int _surrogate = -1;
/**
* Total read character count; used for error reporting purposes
*/
int _charCount = 0;
/**
* Total read byte count; used for error reporting purposes
*/
int _byteCount = 0;
/*
/**********************************************************************
/* Life-cycle
/**********************************************************************
*/
public UTF8Reader(InputStream in, boolean autoClose)
{
super((in == null) ? new Object() : in);
_inputSource = in;
_bufferHolder = _findBufferHolder();
byte[] buffer = _bufferHolder[0];
if (buffer == null) {
buffer = new byte[DEFAULT_BUFFER_SIZE];
} else {
_bufferHolder[0] = null;
}
_inputBuffer = buffer;
_inputPtr = 0;
_inputEnd = 0;
_autoClose = autoClose;
}
public UTF8Reader(byte[] buf, int ptr, int len, boolean autoClose)
{
super(new Object());
_inputSource = null;
_inputBuffer = buf;
_inputPtr = ptr;
_inputEnd = ptr+len;
_autoClose = autoClose;
_bufferHolder = null;
}
private static byte[][] _findBufferHolder()
{
byte[][] bufs = null;
SoftReferenceThreadLocal
contains a {@link java.lang.ref.SoftRerefence}
* to a byte array used for holding content to decode
*/
final protected static ThreadLocal* Feature is enabled by default to conform to SnakeYAML defaults as well as * backwards compatibility with 2.5 and earlier versions. * * @since 2.6 */ SPLIT_LINES(true), /** * Whether strings will be rendered without quotes (true) or * with quotes (false, default). *
* Minimized quote usage makes for more human readable output; however, content is * limited to printable characters according to the rules of * literal block style. * * @since 2.7 */ MINIMIZE_QUOTES(false), /** * Whether numbers stored as strings will be rendered with quotes (true) or * without quotes (false, default) when MINIMIZE_QUOTES is enabled. *
* Minimized quote usage makes for more human readable output; however, content is
* limited to printable characters according to the rules of
* literal block style.
*
* @since 2.8.2
*/
ALWAYS_QUOTE_NUMBERS_AS_STRINGS(false)
;
protected final boolean _defaultState;
protected final int _mask;
/**
* Method that calculates bit set (flags) of all features that
* are enabled by default.
*/
public static int collectDefaults()
{
int flags = 0;
for (Feature f : values()) {
if (f.enabledByDefault()) {
flags |= f.getMask();
}
}
return flags;
}
private Feature(boolean defaultState) {
_defaultState = defaultState;
_mask = (1 << ordinal());
}
public boolean enabledByDefault() { return _defaultState; }
public boolean enabledIn(int flags) { return (flags & _mask) != 0; }
public int getMask() { return _mask; }
}
/*
/**********************************************************
/* Internal constants
/**********************************************************
*/
protected final static long MIN_INT_AS_LONG = (long) Integer.MIN_VALUE;
protected final static long MAX_INT_AS_LONG = (long) Integer.MAX_VALUE;
protected final static Pattern PLAIN_NUMBER_P = Pattern.compile("[0-9]*(\\.[0-9]*)?");
/*
/**********************************************************
/* Configuration
/**********************************************************
*/
final protected IOContext _ioContext;
/**
* Bit flag composed of bits that indicate which
* {@link YAMLGenerator.Feature}s
* are enabled.
*/
protected int _formatFeatures;
protected Writer _writer;
protected DumperOptions _outputOptions;
// for field names, leave out quotes
private final static Character STYLE_NAME = null;
// numbers, booleans, should use implicit
private final static Character STYLE_SCALAR = null;
// Strings quoted for fun
private final static Character STYLE_QUOTED = Character.valueOf('"');
// Strings in literal (block) style
private final static Character STYLE_LITERAL = Character.valueOf('|');
// Which flow style to use for Base64? Maybe basic quoted?
private final static Character STYLE_BASE64 = Character.valueOf('"');
private final static Character STYLE_PLAIN = null;
/*
/**********************************************************
/* Output state
/**********************************************************
*/
protected Emitter _emitter;
/**
* YAML supports native Object identifiers, so databinder may indicate
* need to output one.
*/
protected String _objectId;
/**
* YAML supports native Type identifiers, so databinder may indicate
* need to output one.
*/
protected String _typeId;
/*
/**********************************************************
/* Life-cycle
/**********************************************************
*/
public YAMLGenerator(IOContext ctxt, int jsonFeatures, int yamlFeatures,
ObjectCodec codec, Writer out,
org.yaml.snakeyaml.DumperOptions.Version version)
throws IOException
{
super(jsonFeatures, codec);
_ioContext = ctxt;
_formatFeatures = yamlFeatures;
_writer = out;
_outputOptions = buildDumperOptions(jsonFeatures, yamlFeatures, version);
_emitter = new Emitter(_writer, _outputOptions);
// should we start output now, or try to defer?
_emitter.emit(new StreamStartEvent(null, null));
Map
New code based on Jackson 2.8 and later should NOT use types in this package
but instead rely on {@link com.fasterxml.jackson.dataformat.yaml.JacksonYAMLParseException}
*/
package com.fasterxml.jackson.dataformat.yaml.snakeyaml.error;
jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/resources/ 0000775 0000000 0000000 00000000000 13147455706 0026561 5 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/resources/META-INF/ 0000775 0000000 0000000 00000000000 13147455706 0027721 5 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/resources/META-INF/LICENSE 0000664 0000000 0000000 00000000475 13147455706 0030734 0 ustar 00root root 0000000 0000000 This copy of Jackson JSON processor YAML module is licensed under the
Apache (Software) License, version 2.0 ("the License").
See the License for details about distribution rights, and the
specific rights regarding derivate works.
You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/resources/META-INF/NOTICE 0000664 0000000 0000000 00000001471 13147455706 0030630 0 ustar 00root root 0000000 0000000 # Jackson JSON processor
Jackson is a high-performance, Free/Open Source JSON processing library.
It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has
been in development since 2007.
It is currently developed by a community of developers, as well as supported
commercially by FasterXML.com.
## Licensing
Jackson core and extension components may be licensed under different licenses.
To find the details that apply to this artifact see the accompanying LICENSE file.
For more information, including possible other licensing options, contact
FasterXML.com (http://fasterxml.com).
## Credits
A list of contributors may be found from CREDITS file, which is included
in some artifacts (usually source distributions); but is always available
from the source code management (SCM) system project uses.
jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/resources/META-INF/services/ 0000775 0000000 0000000 00000000000 13147455706 0031544 5 ustar 00root root 0000000 0000000 com.fasterxml.jackson.core.JsonFactory 0000664 0000000 0000000 00000000062 13147455706 0041006 0 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/resources/META-INF/services com.fasterxml.jackson.dataformat.yaml.YAMLFactory
jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/test/ 0000775 0000000 0000000 00000000000 13147455706 0024602 5 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/test/java/ 0000775 0000000 0000000 00000000000 13147455706 0025523 5 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/test/java/com/ 0000775 0000000 0000000 00000000000 13147455706 0026301 5 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/test/java/com/fasterxml/ 0000775 0000000 0000000 00000000000 13147455706 0030306 5 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/test/java/com/fasterxml/jackson/ 0000775 0000000 0000000 00000000000 13147455706 0031736 5 ustar 00root root 0000000 0000000 dataformat/ 0000775 0000000 0000000 00000000000 13147455706 0034001 5 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/test/java/com/fasterxml/jackson yaml/ 0000775 0000000 0000000 00000000000 13147455706 0034743 5 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/test/java/com/fasterxml/jackson/dataformat DatabindAdvancedTest.java 0000664 0000000 0000000 00000012575 13147455706 0041614 0 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/test/java/com/fasterxml/jackson/dataformat/yaml package com.fasterxml.jackson.dataformat.yaml;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.databind.ObjectMapper;
public class DatabindAdvancedTest extends ModuleTestBase
{
enum Size { SMALL, LARGE; }
static class MediaItem
{
private MediaContent _content;
private List-1
from here
*/
@Override
public int getOutputBuffered() {
return -1;
}
@Override
public int getFormatFeatures() {
return _formatFeatures;
}
@Override
public JsonGenerator overrideFormatFeatures(int values, int mask) {
_formatFeatures = (_formatFeatures & ~mask) | (values & mask);
return this;
}
@Override
public boolean canUseSchema(FormatSchema schema) {
return false;
}
@Override
public boolean canWriteFormattedNumbers() { return true; }
//@Override public void setSchema(FormatSchema schema)
/*
/**********************************************************
/* Extended API, configuration
/**********************************************************
*/
public YAMLGenerator enable(Feature f) {
_formatFeatures |= f.getMask();
return this;
}
public YAMLGenerator disable(Feature f) {
_formatFeatures &= ~f.getMask();
return this;
}
public final boolean isEnabled(Feature f) {
return (_formatFeatures & f.getMask()) != 0;
}
public YAMLGenerator configure(Feature f, boolean state) {
if (state) {
enable(f);
} else {
disable(f);
}
return this;
}
/*
/**********************************************************************
/* Overridden methods; writing field names
/**********************************************************************
*/
/* And then methods overridden to make final, streamline some
* aspects...
*/
@Override
public final void writeFieldName(String name) throws IOException
{
if (_writeContext.writeFieldName(name) == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
_writeFieldName(name);
}
@Override
public final void writeFieldName(SerializableString name)
throws IOException
{
// Object is a value, need to verify it's allowed
if (_writeContext.writeFieldName(name.getValue()) == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
_writeFieldName(name.getValue());
}
@Override
public final void writeStringField(String fieldName, String value)
throws IOException
{
if (_writeContext.writeFieldName(fieldName) == JsonWriteContext.STATUS_EXPECT_VALUE) {
_reportError("Can not write a field name, expecting a value");
}
_writeFieldName(fieldName);
writeString(value);
}
private final void _writeFieldName(String name)
throws IOException
{
_writeScalar(name, "string", STYLE_NAME);
}
/*
/**********************************************************
/* Public API: low-level I/O
/**********************************************************
*/
@Override
public final void flush() throws IOException
{
_writer.flush();
}
@Override
public void close() throws IOException
{
if (!isClosed()) {
_emitter.emit(new DocumentEndEvent(null, null, false));
_emitter.emit(new StreamEndEvent(null, null));
super.close();
_writer.close();
}
}
/*
/**********************************************************
/* Public API: structural output
/**********************************************************
*/
@Override
public final void writeStartArray() throws IOException
{
_verifyValueWrite("start an array");
_writeContext = _writeContext.createChildArrayContext();
Boolean style = _outputOptions.getDefaultFlowStyle().getStyleBoolean();
String yamlTag = _typeId;
boolean implicit = (yamlTag == null);
String anchor = _objectId;
if (anchor != null) {
_objectId = null;
}
_emitter.emit(new SequenceStartEvent(anchor, yamlTag,
implicit, null, null, style));
}
@Override
public final void writeEndArray() throws IOException
{
if (!_writeContext.inArray()) {
_reportError("Current context not Array but "+_writeContext.typeDesc());
}
// just to make sure we don't "leak" type ids
_typeId = null;
_writeContext = _writeContext.getParent();
_emitter.emit(new SequenceEndEvent(null, null));
}
@Override
public final void writeStartObject() throws IOException
{
_verifyValueWrite("start an object");
_writeContext = _writeContext.createChildObjectContext();
Boolean style = _outputOptions.getDefaultFlowStyle().getStyleBoolean();
String yamlTag = _typeId;
boolean implicit = (yamlTag == null);
String anchor = _objectId;
if (anchor != null) {
_objectId = null;
}
_emitter.emit(new MappingStartEvent(anchor, yamlTag,
implicit, null, null, style));
}
@Override
public final void writeEndObject() throws IOException
{
if (!_writeContext.inObject()) {
_reportError("Current context not Object but "+_writeContext.typeDesc());
}
// just to make sure we don't "leak" type ids
_typeId = null;
_writeContext = _writeContext.getParent();
_emitter.emit(new MappingEndEvent(null, null));
}
/*
/**********************************************************
/* Output method implementations, textual
/**********************************************************
*/
@Override
public void writeString(String text) throws IOException,JsonGenerationException
{
if (text == null) {
writeNull();
return;
}
_verifyValueWrite("write String value");
Character style = STYLE_QUOTED;
if (Feature.MINIMIZE_QUOTES.enabledIn(_formatFeatures) && !isBooleanContent(text)) {
// If this string could be interpreted as a number, it must be quoted.
if (Feature.ALWAYS_QUOTE_NUMBERS_AS_STRINGS.enabledIn(_formatFeatures)
&& PLAIN_NUMBER_P.matcher(text).matches()) {
style = STYLE_QUOTED;
} else if (text.indexOf('\n') >= 0) {
style = STYLE_LITERAL;
} else {
style = STYLE_PLAIN;
}
}
_writeScalar(text, "string", style);
}
private boolean isBooleanContent(String text) {
return text.equals("true") || text.equals("false");
}
@Override
public void writeString(char[] text, int offset, int len) throws IOException
{
writeString(new String(text, offset, len));
}
@Override
public final void writeString(SerializableString sstr)
throws IOException
{
writeString(sstr.toString());
}
@Override
public void writeRawUTF8String(byte[] text, int offset, int len)
throws IOException
{
_reportUnsupportedOperation();
}
@Override
public final void writeUTF8String(byte[] text, int offset, int len)
throws IOException
{
writeString(new String(text, offset, len, "UTF-8"));
}
/*
/**********************************************************
/* Output method implementations, unprocessed ("raw")
/**********************************************************
*/
@Override
public void writeRaw(String text) throws IOException {
_reportUnsupportedOperation();
}
@Override
public void writeRaw(String text, int offset, int len) throws IOException {
_reportUnsupportedOperation();
}
@Override
public void writeRaw(char[] text, int offset, int len) throws IOException {
_reportUnsupportedOperation();
}
@Override
public void writeRaw(char c) throws IOException {
_reportUnsupportedOperation();
}
@Override
public void writeRawValue(String text) throws IOException {
_reportUnsupportedOperation();
}
@Override
public void writeRawValue(String text, int offset, int len) throws IOException {
_reportUnsupportedOperation();
}
@Override
public void writeRawValue(char[] text, int offset, int len) throws IOException {
_reportUnsupportedOperation();
}
/*
/**********************************************************
/* Output method implementations, base64-encoded binary
/**********************************************************
*/
@Override
public void writeBinary(Base64Variant b64variant, byte[] data, int offset, int len) throws IOException
{
if (data == null) {
writeNull();
return;
}
_verifyValueWrite("write Binary value");
// ok, better just Base64 encode as a String...
if (offset > 0 || (offset+len) != data.length) {
data = Arrays.copyOfRange(data, offset, offset+len);
}
String encoded = b64variant.encode(data);
_writeScalar(encoded, "byte[]", STYLE_BASE64);
}
/*
/**********************************************************
/* Output method implementations, scalars
/**********************************************************
*/
@Override
public void writeBoolean(boolean state) throws IOException
{
_verifyValueWrite("write boolean value");
_writeScalar(state ? "true" : "false", "bool", STYLE_SCALAR);
}
@Override
public void writeNumber(int i) throws IOException
{
_verifyValueWrite("write number");
_writeScalar(String.valueOf(i), "int", STYLE_SCALAR);
}
@Override
public void writeNumber(long l) throws IOException
{
// First: maybe 32 bits is enough?
if (l <= MAX_INT_AS_LONG && l >= MIN_INT_AS_LONG) {
writeNumber((int) l);
return;
}
_verifyValueWrite("write number");
_writeScalar(String.valueOf(l), "long", STYLE_SCALAR);
}
@Override
public void writeNumber(BigInteger v) throws IOException
{
if (v == null) {
writeNull();
return;
}
_verifyValueWrite("write number");
_writeScalar(String.valueOf(v.toString()), "java.math.BigInteger", STYLE_SCALAR);
}
@Override
public void writeNumber(double d) throws IOException
{
_verifyValueWrite("write number");
_writeScalar(String.valueOf(d), "double", STYLE_SCALAR);
}
@Override
public void writeNumber(float f) throws IOException
{
_verifyValueWrite("write number");
_writeScalar(String.valueOf(f), "float", STYLE_SCALAR);
}
@Override
public void writeNumber(BigDecimal dec) throws IOException
{
if (dec == null) {
writeNull();
return;
}
_verifyValueWrite("write number");
String str = isEnabled(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN) ? dec.toPlainString() : dec.toString();
_writeScalar(str, "java.math.BigDecimal", STYLE_SCALAR);
}
@Override
public void writeNumber(String encodedValue) throws IOException,JsonGenerationException, UnsupportedOperationException
{
if (encodedValue == null) {
writeNull();
return;
}
_verifyValueWrite("write number");
_writeScalar(encodedValue, "number", STYLE_SCALAR);
}
@Override
public void writeNull() throws IOException
{
_verifyValueWrite("write null value");
// no real type for this, is there?
_writeScalar("null", "object", STYLE_SCALAR);
}
/*
/**********************************************************
/* Public API, write methods, Native Ids
/**********************************************************
*/
@Override
public boolean canWriteObjectId() {
// yes, YAML does support Native Type Ids!
// 10-Sep-2014, tatu: Except as per [#23] might not want to...
return Feature.USE_NATIVE_OBJECT_ID.enabledIn(_formatFeatures);
}
@Override
public boolean canWriteTypeId() {
// yes, YAML does support Native Type Ids!
// 10-Sep-2014, tatu: Except as per [#22] might not want to...
return Feature.USE_NATIVE_TYPE_ID.enabledIn(_formatFeatures);
}
@Override
public void writeTypeId(Object id)
throws IOException
{
// should we verify there's no preceding type id?
_typeId = String.valueOf(id);
}
@Override
public void writeObjectRef(Object id)
throws IOException
{
_verifyValueWrite("write Object reference");
AliasEvent evt = new AliasEvent(String.valueOf(id), null, null);
_emitter.emit(evt);
}
@Override
public void writeObjectId(Object id)
throws IOException
{
// should we verify there's no preceding id?
_objectId = String.valueOf(id);
}
/*
/**********************************************************
/* Implementations for methods from base class
/**********************************************************
*/
@Override
protected final void _verifyValueWrite(String typeMsg)
throws IOException
{
int status = _writeContext.writeValue();
if (status == JsonWriteContext.STATUS_EXPECT_NAME) {
_reportError("Can not "+typeMsg+", expecting field name");
}
}
@Override
protected void _releaseBuffers() {
// nothing special to do...
}
/*
/**********************************************************
/* Internal methods
/**********************************************************
*/
// Implicit means that (type) tags won't be shown, right?
private final static ImplicitTuple DEFAULT_IMPLICIT = new ImplicitTuple(true, true);
protected void _writeScalar(String value, String type, Character style) throws IOException
{
_emitter.emit(_scalarEvent(value, style));
}
protected ScalarEvent _scalarEvent(String value, Character style)
{
String yamlTag = _typeId;
if (yamlTag != null) {
_typeId = null;
}
String anchor = _objectId;
if (anchor != null) {
_objectId = null;
}
return new ScalarEvent(anchor, yamlTag, DEFAULT_IMPLICIT, value,
null, null, style);
}
}
YAMLMapper.java 0000664 0000000 0000000 00000004221 13147455706 0037461 0 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/java/com/fasterxml/jackson/dataformat/yaml package com.fasterxml.jackson.dataformat.yaml;
import com.fasterxml.jackson.databind.ObjectMapper;
//import com.fasterxml.jackson.databind.ObjectMapper;
/**
* Convenience version of {@link ObjectMapper} which is configured
* with {@link com.fasterxml.jackson.dataformat.yaml.YAMLFactory}.
*/
public class YAMLMapper extends ObjectMapper
{
private static final long serialVersionUID = 1L;
public YAMLMapper() { this(new YAMLFactory()); }
public YAMLMapper(YAMLFactory f) {
super(f);
}
/**
* @since 2.5
*/
public YAMLMapper(YAMLMapper base) {
super(base);
}
/**
* @since 2.5
*/
@Override
public YAMLMapper copy()
{
_checkInvalidCopy(YAMLMapper.class);
return new YAMLMapper(this);
}
/*
/**********************************************************************
/* Configuration
/**********************************************************************
*/
public YAMLMapper configure(YAMLGenerator.Feature f, boolean state) {
return state ? enable(f) : disable(f);
}
public YAMLMapper configure(YAMLParser.Feature f, boolean state) {
return state ? enable(f) : disable(f);
}
public YAMLMapper enable(YAMLGenerator.Feature f) {
((YAMLFactory)_jsonFactory).enable(f);
return this;
}
public YAMLMapper enable(YAMLParser.Feature f) {
((YAMLFactory)_jsonFactory).enable(f);
return this;
}
public YAMLMapper disable(YAMLGenerator.Feature f) {
((YAMLFactory)_jsonFactory).disable(f);
return this;
}
public YAMLMapper disable(YAMLParser.Feature f) {
((YAMLFactory)_jsonFactory).disable(f);
return this;
}
/*
/**********************************************************************
/* Additional typed accessors
/**********************************************************************
*/
/**
* Overridden with more specific type, since factory we have
* is always of type {@link YAMLFactory}
*/
@Override
public final YAMLFactory getFactory() {
return (YAMLFactory) _jsonFactory;
}
}
YAMLParser.java 0000664 0000000 0000000 00000066710 13147455706 0037504 0 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/java/com/fasterxml/jackson/dataformat/yaml package com.fasterxml.jackson.dataformat.yaml;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.regex.Pattern;
import org.yaml.snakeyaml.error.Mark;
import org.yaml.snakeyaml.events.*;
import org.yaml.snakeyaml.nodes.NodeId;
import org.yaml.snakeyaml.nodes.Tag;
import org.yaml.snakeyaml.parser.ParserImpl;
import org.yaml.snakeyaml.reader.StreamReader;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.core.base.ParserBase;
import com.fasterxml.jackson.core.io.IOContext;
import com.fasterxml.jackson.core.util.BufferRecycler;
import com.fasterxml.jackson.core.util.ByteArrayBuilder;
import org.yaml.snakeyaml.resolver.Resolver;
/**
* {@link JsonParser} implementation used to expose YAML documents
* in form that allows other Jackson functionality to process YAML content,
* such as binding POJOs to and from it, and building tree representations.
*/
public class YAMLParser extends ParserBase
{
/**
* Enumeration that defines all togglable features for YAML parsers.
*/
public enum Feature // implements FormatFeature // in 2.7
{
;
final boolean _defaultState;
final int _mask;
/**
* Method that calculates bit set (flags) of all features that
* are enabled by default.
*/
public static int collectDefaults()
{
int flags = 0;
for (Feature f : values()) {
if (f.enabledByDefault()) {
flags |= f.getMask();
}
}
return flags;
}
private Feature(boolean defaultState) {
_defaultState = defaultState;
_mask = (1 << ordinal());
}
public boolean enabledByDefault() { return _defaultState; }
public boolean enabledIn(int flags) { return (flags & _mask) != 0; }
public int getMask() { return _mask; }
}
// note: does NOT include '0', handled separately
// private final static Pattern PATTERN_INT = Pattern.compile("-?[1-9][0-9]*");
/**
* We will use pattern that is bit stricter than YAML definition,
* but we will still allow things like extra '_' in there.
*/
private final static Pattern PATTERN_FLOAT = Pattern.compile(
"[-+]?([0-9][0-9_]*)?\\.[0-9]*([eE][-+][0-9]+)?");
/*
/**********************************************************************
/* Configuration
/**********************************************************************
*/
/**
* Codec used for data binding when (if) requested.
*/
protected ObjectCodec _objectCodec;
protected int _formatFeatures;
/*
/**********************************************************************
/* Input sources
/**********************************************************************
*/
/**
* Need to keep track of underlying {@link Reader} to be able to
* auto-close it (if required to)
*/
protected final Reader _reader;
protected final ParserImpl _yamlParser;
protected final Resolver _yamlResolver = new Resolver();
/*
/**********************************************************************
/* State
/**********************************************************************
*/
/**
* Keep track of the last event read, to get access to Location info
*/
protected Event _lastEvent;
/**
* We need to keep track of text values.
*/
protected String _textValue;
/**
* Let's also have a local copy of the current field name
*/
protected String _currentFieldName;
/**
* Flag that is set when current token was derived from an Alias
* (reference to another value's anchor)
*
* @since 2.1
*/
protected boolean _currentIsAlias;
/**
* Anchor for the value that parser currently points to: in case of
* structured types, value whose first token current token is.
*/
protected String _currentAnchor;
/*
/**********************************************************************
/* Life-cycle
/**********************************************************************
*/
public YAMLParser(IOContext ctxt, BufferRecycler br,
int parserFeatures, int formatFeatures,
ObjectCodec codec, Reader reader)
{
super(ctxt, parserFeatures);
_objectCodec = codec;
_formatFeatures = formatFeatures;
_reader = reader;
_yamlParser = new ParserImpl(new StreamReader(reader));
}
@Override
public ObjectCodec getCodec() {
return _objectCodec;
}
@Override
public void setCodec(ObjectCodec c) {
_objectCodec = c;
}
/*
/**********************************************************
/* Extended YAML-specific API
/**********************************************************
*/
/**
* Method that can be used to check whether current token was
* created from YAML Alias token (reference to an anchor).
*
* @since 2.1
*/
public boolean isCurrentAlias() {
return _currentIsAlias;
}
/**
* Method that can be used to check if the current token has an
* associated anchor (id to reference via Alias)
*
* @deprecated Since 2.3 (was added in 2.1) -- use {@link #getObjectId} instead
*/
@Deprecated
public String getCurrentAnchor() {
return _currentAnchor;
}
/*
/**********************************************************
/* Versioned
/**********************************************************
*/
@Override
public Version version() {
return PackageVersion.VERSION;
}
/*
/**********************************************************
/* ParserBase method impls
/**********************************************************
*/
@Override
protected void _closeInput() throws IOException {
_reader.close();
}
/*
/**********************************************************
/* FormatFeature support
/**********************************************************
*/
@Override
public int getFormatFeatures() {
return _formatFeatures;
}
@Override
public JsonParser overrideFormatFeatures(int values, int mask) {
_formatFeatures = (_formatFeatures & ~mask) | (values & mask);
return this;
}
/*
/***************************************************
/* Public API, configuration
/***************************************************
*/
/**
* Method for enabling specified CSV feature
* (check {@link Feature} for list of features)
*/
public JsonParser enable(YAMLParser.Feature f)
{
_formatFeatures |= f.getMask();
return this;
}
/**
* Method for disabling specified CSV feature
* (check {@link Feature} for list of features)
*/
public JsonParser disable(YAMLParser.Feature f)
{
_formatFeatures &= ~f.getMask();
return this;
}
/**
* Method for enabling or disabling specified CSV feature
* (check {@link Feature} for list of features)
*/
public JsonParser configure(YAMLParser.Feature f, boolean state)
{
if (state) {
enable(f);
} else {
disable(f);
}
return this;
}
/**
* Method for checking whether specified CSV {@link Feature}
* is enabled.
*/
public boolean isEnabled(YAMLParser.Feature f) {
return (_formatFeatures & f.getMask()) != 0;
}
// @Override public CsvSchema getSchema()
/*
/**********************************************************
/* Location info
/**********************************************************
*/
@Override
public JsonLocation getTokenLocation()
{
if (_lastEvent == null) {
return JsonLocation.NA;
}
return _locationFor(_lastEvent.getStartMark());
}
@Override
public JsonLocation getCurrentLocation() {
// can assume we are at the end of token now...
if (_lastEvent == null) {
return JsonLocation.NA;
}
return _locationFor(_lastEvent.getEndMark());
}
protected JsonLocation _locationFor(Mark m)
{
if (m == null) {
return new JsonLocation(_ioContext.getSourceReference(),
-1, -1, -1);
}
return new JsonLocation(_ioContext.getSourceReference(),
-1,
m.getLine() + 1, // from 0- to 1-based
m.getColumn() + 1); // ditto
}
// Note: SHOULD override 'getTokenLineNr', 'getTokenColumnNr', but those are final in 2.0
/*
/**********************************************************
/* Parsing
/**********************************************************
*/
@SuppressWarnings("deprecation")
@Override
public JsonToken nextToken() throws IOException
{
_currentIsAlias = false;
_binaryValue = null;
_currentAnchor = null;
if (_closed) {
return null;
}
while (true) {
Event evt;
try {
evt = _yamlParser.getEvent();
} catch (org.yaml.snakeyaml.error.YAMLException e) {
if (e instanceof org.yaml.snakeyaml.error.MarkedYAMLException) {
throw com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAMLException.from
(this, (org.yaml.snakeyaml.error.MarkedYAMLException) e);
}
throw com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.YAMLException.from(this, e);
}
// is null ok? Assume it is, for now, consider to be same as end-of-doc
if (evt == null) {
return (_currToken = null);
}
_lastEvent = evt;
/* One complication: field names are only inferred from the
* fact that we are in Object context...
*/
if (_parsingContext.inObject() && _currToken != JsonToken.FIELD_NAME) {
if (!evt.is(Event.ID.Scalar)) {
// end is fine
if (evt.is(Event.ID.MappingEnd)) {
if (!_parsingContext.inObject()) { // sanity check is optional, but let's do it for now
_reportMismatchedEndMarker('}', ']');
}
_parsingContext = _parsingContext.getParent();
return (_currToken = JsonToken.END_OBJECT);
}
_reportError("Expected a field name (Scalar value in YAML), got this instead: "+evt);
}
ScalarEvent scalar = (ScalarEvent) evt;
String name = scalar.getValue();
_currentFieldName = name;
_parsingContext.setCurrentName(name);
_currentAnchor = scalar.getAnchor();
return (_currToken = JsonToken.FIELD_NAME);
}
// Ugh. Why not expose id, to be able to Switch?
// scalar values are probably the commonest:
if (evt.is(Event.ID.Scalar)) {
JsonToken t = _decodeScalar((ScalarEvent) evt);
_currToken = t;
return t;
}
// followed by maps, then arrays
if (evt.is(Event.ID.MappingStart)) {
Mark m = evt.getStartMark();
MappingStartEvent map = (MappingStartEvent) evt;
_currentAnchor = map.getAnchor();
_parsingContext = _parsingContext.createChildObjectContext(m.getLine(), m.getColumn());
return (_currToken = JsonToken.START_OBJECT);
}
if (evt.is(Event.ID.MappingEnd)) { // actually error; can not have map-end here
_reportError("Not expecting END_OBJECT but a value");
}
if (evt.is(Event.ID.SequenceStart)) {
Mark m = evt.getStartMark();
_currentAnchor = ((NodeEvent)evt).getAnchor();
_parsingContext = _parsingContext.createChildArrayContext(m.getLine(), m.getColumn());
return (_currToken = JsonToken.START_ARRAY);
}
if (evt.is(Event.ID.SequenceEnd)) {
if (!_parsingContext.inArray()) { // sanity check is optional, but let's do it for now
_reportMismatchedEndMarker(']', '}');
}
_parsingContext = _parsingContext.getParent();
return (_currToken = JsonToken.END_ARRAY);
}
// after this, less common tokens:
if (evt.is(Event.ID.DocumentEnd)) {
// [dataformat-yaml#72]: logical end of doc; fine. Two choices; either skip,
// or return null as marker (but do NOT close). Earlier returned `null`, but
// to allow multi-document reading should actually just skip.
// return (_currToken = null);
continue;
}
if (evt.is(Event.ID.DocumentStart)) {
// DocumentStartEvent dd = (DocumentStartEvent) evt;
// does this matter? Shouldn't, should it?
continue;
}
if (evt.is(Event.ID.Alias)) {
AliasEvent alias = (AliasEvent) evt;
_currentIsAlias = true;
_textValue = alias.getAnchor();
// for now, nothing to do: in future, maybe try to expose as ObjectIds?
return (_currToken = JsonToken.VALUE_STRING);
}
if (evt.is(Event.ID.StreamEnd)) { // end-of-input; force closure
close();
return (_currToken = null);
}
if (evt.is(Event.ID.StreamStart)) { // useless, skip
continue;
}
}
}
protected JsonToken _decodeScalar(ScalarEvent scalar)
{
String value = scalar.getValue();
_textValue = value;
// we may get an explicit tag, if so, use for corroborating...
String typeTag = scalar.getTag();
final int len = value.length();
if (typeTag == null || typeTag.equals("!")) { // no, implicit
Tag nodeTag = _yamlResolver.resolve(NodeId.scalar, value, scalar.getImplicit().canOmitTagInPlainScalar());
if (nodeTag == Tag.STR) {
return JsonToken.VALUE_STRING;
}
if (nodeTag == Tag.INT) {
return _decodeNumberScalar(value, len);
}
if (nodeTag == Tag.FLOAT) {
_numTypesValid = 0;
return JsonToken.VALUE_NUMBER_FLOAT;
}
if (nodeTag == Tag.BOOL) {
Boolean B = _matchYAMLBoolean(value, len);
if (B != null) {
return B ? JsonToken.VALUE_TRUE : JsonToken.VALUE_FALSE;
}
} else if (nodeTag == Tag.NULL) {
return JsonToken.VALUE_NULL;
} else {
// what to do with timestamp and binary and merge etc.
return JsonToken.VALUE_STRING;
}
} else { // yes, got type tag
if (typeTag.startsWith("tag:yaml.org,2002:")) {
typeTag = typeTag.substring("tag:yaml.org,2002:".length());
if (typeTag.contains(",")) {
typeTag = typeTag.split(",")[0];
}
}
// canonical values by YAML are actually 'y' and 'n'; but plenty more unofficial:
if ("bool".equals(typeTag)) { // must be "true" or "false"
Boolean B = _matchYAMLBoolean(value, len);
if (B != null) {
return B ? JsonToken.VALUE_TRUE : JsonToken.VALUE_FALSE;
}
} else if ("int".equals(typeTag)) {
return _decodeNumberScalar(value, len);
} else if ("float".equals(typeTag)) {
_numTypesValid = 0;
return JsonToken.VALUE_NUMBER_FLOAT;
} else if ("null".equals(typeTag)) {
return JsonToken.VALUE_NULL;
}
}
// any way to figure out actual type? No?
return JsonToken.VALUE_STRING;
}
protected Boolean _matchYAMLBoolean(String value, int len)
{
switch (len) {
case 1:
switch (value.charAt(0)) {
case 'y': case 'Y': return Boolean.TRUE;
case 'n': case 'N': return Boolean.FALSE;
}
break;
case 2:
if ("no".equalsIgnoreCase(value)) return Boolean.FALSE;
if ("on".equalsIgnoreCase(value)) return Boolean.TRUE;
break;
case 3:
if ("yes".equalsIgnoreCase(value)) return Boolean.TRUE;
if ("off".equalsIgnoreCase(value)) return Boolean.FALSE;
break;
case 4:
if ("true".equalsIgnoreCase(value)) return Boolean.TRUE;
break;
case 5:
if ("false".equalsIgnoreCase(value)) return Boolean.FALSE;
break;
}
return null;
}
protected JsonToken _decodeNumberScalar(String value, final int len)
{
if ("0".equals(value)) { // special case for regexp (can't take minus etc)
_numberNegative = false;
_numberInt = 0;
_numTypesValid = NR_INT;
return JsonToken.VALUE_NUMBER_INT;
}
/* 05-May-2012, tatu: Turns out this is a hot spot; so let's write it
* out and avoid regexp overhead...
*/
//if (PATTERN_INT.matcher(value).matches()) {
int i;
if (value.charAt(0) == '-') {
_numberNegative = true;
i = 1;
if (len == 1) {
return null;
}
} else {
_numberNegative = false;
i = 0;
}
while (true) {
int c = value.charAt(i);
if (c > '9' || c < '0') {
break;
}
if (++i == len) {
_numTypesValid = 0;
return JsonToken.VALUE_NUMBER_INT;
}
}
if (PATTERN_FLOAT.matcher(value).matches()) {
_numTypesValid = 0;
return JsonToken.VALUE_NUMBER_FLOAT;
}
// 25-Aug-2016, tatu: If we can't actually match it to valid number,
// consider String; better than claiming there's not toekn
return JsonToken.VALUE_STRING;
}
/*
/**********************************************************
/* String value handling
/**********************************************************
*/
// For now we do not store char[] representation...
@Override
public boolean hasTextCharacters() {
return false;
}
@Override
public String getText() throws IOException
{
if (_currToken == JsonToken.VALUE_STRING) {
return _textValue;
}
if (_currToken == JsonToken.FIELD_NAME) {
return _currentFieldName;
}
if (_currToken != null) {
if (_currToken.isScalarValue()) {
return _textValue;
}
return _currToken.asString();
}
return null;
}
@Override
public String getCurrentName() throws IOException
{
if (_currToken == JsonToken.FIELD_NAME) {
return _currentFieldName;
}
return super.getCurrentName();
}
@Override
public char[] getTextCharacters() throws IOException {
String text = getText();
return (text == null) ? null : text.toCharArray();
}
@Override
public int getTextLength() throws IOException {
String text = getText();
return (text == null) ? 0 : text.length();
}
@Override
public int getTextOffset() throws IOException {
return 0;
}
@Override // since 2.8
public int getText(Writer writer) throws IOException
{
String str = getText();
if (str == null) {
return 0;
}
writer.write(str);
return str.length();
}
/*
/**********************************************************************
/* Binary (base64)
/**********************************************************************
*/
@Override
public Object getEmbeddedObject() throws IOException {
return null;
}
// TODO: can remove from 2.9 or so (base impl added in 2.8)
@SuppressWarnings("resource")
@Override
public byte[] getBinaryValue(Base64Variant variant) throws IOException
{
if (_binaryValue == null) {
if (_currToken != JsonToken.VALUE_STRING) {
_reportError("Current token ("+_currToken+") not VALUE_STRING, can not access as binary");
}
ByteArrayBuilder builder = _getByteArrayBuilder();
_decodeBase64(getText(), builder, variant);
_binaryValue = builder.toByteArray();
}
return _binaryValue;
}
/*
/**********************************************************************
/* Number accessor overrides
/**********************************************************************
*/
@Override
protected void _parseNumericValue(int expType) throws IOException
{
// Int or float?
if (_currToken == JsonToken.VALUE_NUMBER_INT) {
int len = _textValue.length();
if (_numberNegative) {
len--;
}
if (len <= 9) { // definitely fits in int
_numberInt = Integer.parseInt(_textValue);
_numTypesValid = NR_INT;
return;
}
if (len <= 18) { // definitely fits AND is easy to parse using 2 int parse calls
long l = Long.parseLong(_textValue);
// [JACKSON-230] Could still fit in int, need to check
if (len == 10) {
if (_numberNegative) {
if (l >= Integer.MIN_VALUE) {
_numberInt = (int) l;
_numTypesValid = NR_INT;
return;
}
} else {
if (l <= Integer.MAX_VALUE) {
_numberInt = (int) l;
_numTypesValid = NR_INT;
return;
}
}
}
_numberLong = l;
_numTypesValid = NR_LONG;
return;
}
// !!! TODO: implement proper bounds checks; now we'll just use BigInteger for convenience
try {
BigInteger n = new BigInteger(_textValue);
// Could still fit in a long, need to check
if (len == 19 && n.bitLength() <= 63) {
_numberLong = n.longValue();
_numTypesValid = NR_LONG;
return;
}
_numberBigInt = n;
_numTypesValid = NR_BIGINT;
return;
} catch (NumberFormatException nex) {
// Can this ever occur? Due to overflow, maybe?
_wrapError("Malformed numeric value '"+_textValue+"'", nex);
}
}
if (_currToken == JsonToken.VALUE_NUMBER_FLOAT) {
// related to [Issue-4]: strip out optional underscores, if any:
String str = _cleanYamlDouble(_textValue);
try {
if (expType == NR_BIGDECIMAL) {
_numberBigDecimal = new BigDecimal(str);
_numTypesValid = NR_BIGDECIMAL;
} else {
// Otherwise double has to do
_numberDouble = Double.parseDouble(str);
_numTypesValid = NR_DOUBLE;
}
} catch (NumberFormatException nex) {
// Can this ever occur? Due to overflow, maybe?
_wrapError("Malformed numeric value '"+str+"'", nex);
}
return;
}
_reportError("Current token ("+_currToken+") not numeric, can not use numeric value accessors");
}
@Override
protected int _parseIntValue() throws IOException
{
if (_currToken == JsonToken.VALUE_NUMBER_INT) {
int len = _textValue.length();
if (_numberNegative) {
len--;
}
if (len <= 9) { // definitely fits in int
_numTypesValid = NR_INT;
return (_numberInt = Integer.parseInt(_textValue));
}
}
_parseNumericValue(NR_INT);
if ((_numTypesValid & NR_INT) == 0) {
convertNumberToInt();
}
return _numberInt;
}
/*
/**********************************************************************
/* Native id (type id) access
/**********************************************************************
*/
@Override
public boolean canReadObjectId() { // yup
return true;
}
@Override
public boolean canReadTypeId() {
return true; // yes, YAML got 'em
}
@Override
public String getObjectId() throws IOException, JsonGenerationException
{
return _currentAnchor;
}
@Override
public String getTypeId() throws IOException, JsonGenerationException
{
String tag;
if (_lastEvent instanceof CollectionStartEvent) {
tag = ((CollectionStartEvent) _lastEvent).getTag();
} else if (_lastEvent instanceof ScalarEvent) {
tag = ((ScalarEvent) _lastEvent).getTag();
} else {
return null;
}
if (tag != null) {
/* 04-Aug-2013, tatu: Looks like YAML parser's expose these in...
* somewhat exotic ways sometimes. So let's prepare to peel off
* some wrappings:
*/
while (tag.startsWith("!")) {
tag = tag.substring(1);
}
return tag;
}
return null;
}
/*
/**********************************************************************
/* Internal methods
/**********************************************************************
*/
/**
* Helper method used to clean up YAML floating-point value so it can be parsed
* using standard JDK classes.
* Currently this just means stripping out optional underscores.
*/
private String _cleanYamlDouble(String str)
{
final int len = str.length();
int ix = str.indexOf('_');
if (ix < 0 || len == 0) {
return str;
}
StringBuilder sb = new StringBuilder(len);
// first: do we have a leading plus sign to skip?
int i = (str.charAt(0) == '+') ? 1 : 0;
for (; i < len; ++i) {
char c = str.charAt(i);
if (c != '_') {
sb.append(c);
}
}
return sb.toString();
}
}
snakeyaml/ 0000775 0000000 0000000 00000000000 13147455706 0036674 5 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/java/com/fasterxml/jackson/dataformat/yaml error/ 0000775 0000000 0000000 00000000000 13147455706 0040025 5 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/java/com/fasterxml/jackson/dataformat/yaml/snakeyaml Mark.java 0000664 0000000 0000000 00000002105 13147455706 0041560 0 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/java/com/fasterxml/jackson/dataformat/yaml/snakeyaml/error package com.fasterxml.jackson.dataformat.yaml.snakeyaml.error;
/**
* Placeholder for shaded org.yaml.snakeyaml.error.Mark
*
* @since 2.8 (as non-shaded); earlier shaded in
*
* @deprecated Should use basic {@link com.fasterxml.jackson.core.JsonLocation} instead
*/
@Deprecated // since 2.8
public class Mark
{
protected final org.yaml.snakeyaml.error.Mark _source;
protected Mark(org.yaml.snakeyaml.error.Mark src) {
_source = src;
}
public static Mark from(org.yaml.snakeyaml.error.Mark src) {
return (src == null) ? null : new Mark(src);
}
public String getName() {
return _source.getName();
}
public String get_snippet() {
return _source.get_snippet();
}
public String get_snippet(int indent, int max_length) {
return _source.get_snippet(indent, max_length);
}
public int getColumn() {
return _source.getColumn();
}
public int getLine() {
return _source.getLine();
}
public int getIndex() {
return _source.getIndex();
}
}
MarkedYAMLException.java 0000664 0000000 0000000 00000002362 13147455706 0044440 0 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/java/com/fasterxml/jackson/dataformat/yaml/snakeyaml/error package com.fasterxml.jackson.dataformat.yaml.snakeyaml.error;
import com.fasterxml.jackson.core.JsonParser;
/**
* Replacement for formerly shaded exception type from SnakeYAML; included
* in 2.8 solely for backwards compatibility: new code that relies on Jackson 2.8
* and alter should NOT use this type but only base type {@link YAMLException}.
*
* @deprecated Since 2.8
*/
@Deprecated
public class MarkedYAMLException extends YAMLException
{
private static final long serialVersionUID = 1L;
protected final org.yaml.snakeyaml.error.MarkedYAMLException _source;
protected MarkedYAMLException(JsonParser p,
org.yaml.snakeyaml.error.MarkedYAMLException src) {
super(p, src);
_source = src;
}
public static MarkedYAMLException from(JsonParser p,
org.yaml.snakeyaml.error.MarkedYAMLException src) {
return new MarkedYAMLException(p, src);
}
public String getContext() {
return _source.getContext();
}
public Mark getContextMark() {
return Mark.from(_source.getContextMark());
}
public String getProblem() {
return _source.getProblem();
}
public Mark getProblemMark() {
return Mark.from(_source.getProblemMark());
}
}
YAMLException.java 0000664 0000000 0000000 00000001571 13147455706 0043315 0 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/java/com/fasterxml/jackson/dataformat/yaml/snakeyaml/error package com.fasterxml.jackson.dataformat.yaml.snakeyaml.error;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.dataformat.yaml.JacksonYAMLParseException;
/**
* Replacement for formerly shaded exception type from SnakeYAML; included
* in 2.8 solely for backwards compatibility: new code that relies on Jackson 2.8
* and alter should NOT use this type but only base type {@link YAMLException}.
*
* @deprecated Since 2.8
*/
@Deprecated
public class YAMLException extends JacksonYAMLParseException
{
private static final long serialVersionUID = 1L;
public YAMLException(JsonParser p,
org.yaml.snakeyaml.error.YAMLException src) {
super(p, src.getMessage(), src);
}
public static YAMLException from(JsonParser p,
org.yaml.snakeyaml.error.YAMLException src) {
return new YAMLException(p, src);
}
}
package-info.java 0000664 0000000 0000000 00000000765 13147455706 0043224 0 ustar 00root root 0000000 0000000 jackson-dataformat-yaml-jackson-dataformat-yaml-2.8.10/src/main/java/com/fasterxml/jackson/dataformat/yaml/snakeyaml/error /**
Replacement for shaded-in package that Jackson versions up to and including 2.7
had; with 2.8 (and later 2.x) we unfortunately fake to sort of fake formerly
relocated types. This is needed to improve backwards compatibility with
frameworks like DropWizard.