本文整理了Java中com.fasterxml.jackson.dataformat.yaml.YAMLParser
类的一些代码示例,展示了YAMLParser
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAMLParser
类的具体详情如下:
包路径:com.fasterxml.jackson.dataformat.yaml.YAMLParser
类名称:YAMLParser
[英]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.
[中]JsonParser实现用于以允许其他Jackson功能处理YAML内容的形式公开YAML文档,例如将POJO与之绑定,以及构建树表示。
代码示例来源:origin: redisson/redisson
@Override
public int getTextLength() throws IOException {
String text = getText();
return (text == null) ? 0 : text.length();
}
代码示例来源:origin: redisson/redisson
@Override
protected YAMLParser _createParser(char[] data, int offset, int len, IOContext ctxt,
boolean recyclable) throws IOException {
return new YAMLParser(ctxt, _getBufferRecycler(), _parserFeatures, _yamlParserFeatures,
_objectCodec, new CharArrayReader(data, offset, len));
}
代码示例来源:origin: redisson/redisson
return _decodeNumberScalar(value, len);
return _cleanYamlFloat(value);
Boolean B = _matchYAMLBoolean(value, len);
if (B != null) {
return B ? JsonToken.VALUE_TRUE : JsonToken.VALUE_FALSE;
_binaryValue = Base64Variants.MIME.decode(value);
} catch (IllegalArgumentException e) {
_reportError(e.getMessage());
Boolean B = _matchYAMLBoolean(value, len);
if (B != null) {
return B ? JsonToken.VALUE_TRUE : JsonToken.VALUE_FALSE;
return _decodeNumberScalar(value, len);
return _cleanYamlFloat(value);
代码示例来源:origin: redisson/redisson
@Override
protected int _parseIntValue() throws IOException
{
if (_currToken == JsonToken.VALUE_NUMBER_INT) {
int len = _cleanedTextValue.length();
if (_numberNegative) {
len--;
}
if (len <= 9) { // definitely fits in int
_numTypesValid = NR_INT;
return (_numberInt = Integer.parseInt(_cleanedTextValue));
}
}
_parseNumericValue(NR_INT);
if ((_numTypesValid & NR_INT) == 0) {
convertNumberToInt();
}
return _numberInt;
}
代码示例来源:origin: redisson/redisson
_numTypesValid = 0;
if (underscores > 0) {
return _cleanYamlInt(_textValue);
return _cleanYamlFloat(_textValue);
代码示例来源:origin: redisson/redisson
_wrapError("Malformed numeric value '"+_textValue+"'", nex);
_wrapError("Malformed numeric value '"+_textValue+"'", nex);
_reportError("Current token ("+_currToken+") not numeric, can not use numeric value accessors");
代码示例来源:origin: redisson/redisson
_reportMismatchedEndMarker('}', ']');
_reportError("Expected a field name (Scalar value in YAML), got this instead: "+evt);
JsonToken t = _decodeScalar((ScalarEvent) evt);
_currToken = t;
return t;
_reportError("Not expecting END_OBJECT but a value");
_reportMismatchedEndMarker(']', '}');
close();
return (_currToken = null);
代码示例来源:origin: redisson/redisson
@Override
public JsonLocation getCurrentLocation() {
// can assume we are at the end of token now...
if (_lastEvent == null) {
return JsonLocation.NA;
}
return _locationFor(_lastEvent.getEndMark());
}
代码示例来源:origin: com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
_reportMismatchedEndMarker('}', ']');
_reportError("Expected a field name (Scalar value in YAML), got this instead: "+evt);
JsonToken t = _decodeScalar((ScalarEvent) evt);
_currToken = t;
return t;
_reportError("Not expecting END_OBJECT but a value");
_reportMismatchedEndMarker(']', '}');
close();
return (_currToken = null);
代码示例来源:origin: com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
@Override
protected int _parseIntValue() throws IOException
{
if (_currToken == JsonToken.VALUE_NUMBER_INT) {
int len = _cleanedTextValue.length();
if (_numberNegative) {
len--;
}
if (len <= 9) { // definitely fits in int
_numTypesValid = NR_INT;
return (_numberInt = Integer.parseInt(_cleanedTextValue));
}
}
_parseNumericValue(NR_INT);
if ((_numTypesValid & NR_INT) == 0) {
convertNumberToInt();
}
return _numberInt;
}
代码示例来源:origin: com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
_numTypesValid = 0;
if (underscores > 0) {
return _cleanYamlInt(_textValue);
return _cleanYamlFloat(_textValue);
代码示例来源:origin: com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
_wrapError("Malformed numeric value '"+_textValue+"'", nex);
_wrapError("Malformed numeric value '"+_textValue+"'", nex);
_reportError("Current token ("+_currToken+") not numeric, can not use numeric value accessors");
代码示例来源:origin: redisson/redisson
@Override
public JsonLocation getTokenLocation()
{
if (_lastEvent == null) {
return JsonLocation.NA;
}
return _locationFor(_lastEvent.getStartMark());
}
代码示例来源:origin: com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
return _decodeNumberScalar(value, len);
return _cleanYamlFloat(value);
Boolean B = _matchYAMLBoolean(value, len);
if (B != null) {
return B ? JsonToken.VALUE_TRUE : JsonToken.VALUE_FALSE;
_binaryValue = Base64Variants.MIME.decode(value);
} catch (IllegalArgumentException e) {
_reportError(e.getMessage());
Boolean B = _matchYAMLBoolean(value, len);
if (B != null) {
return B ? JsonToken.VALUE_TRUE : JsonToken.VALUE_FALSE;
return _decodeNumberScalar(value, len);
return _cleanYamlFloat(value);
代码示例来源:origin: FasterXML/jackson-dataformats-text
_reportMismatchedEndMarker('}', ']');
_reportError("Expected a field name (Scalar value in YAML), got this instead: "+evt);
JsonToken t = _decodeScalar((ScalarEvent) evt);
_currToken = t;
return t;
_reportError("Not expecting END_OBJECT but a value");
_reportMismatchedEndMarker(']', '}');
close();
return (_currToken = null);
代码示例来源:origin: redisson/redisson
@Override
public char[] getTextCharacters() throws IOException {
String text = getText();
return (text == null) ? null : text.toCharArray();
}
代码示例来源:origin: redisson/redisson
@Override
protected YAMLParser _createParser(Reader r, IOContext ctxt) throws IOException {
return new YAMLParser(ctxt, _getBufferRecycler(), _parserFeatures, _yamlParserFeatures,
_objectCodec, r);
}
代码示例来源:origin: FasterXML/jackson-dataformats-text
@Override
protected int _parseIntValue() throws IOException
{
if (_currToken == JsonToken.VALUE_NUMBER_INT) {
int len = _cleanedTextValue.length();
if (_numberNegative) {
len--;
}
if (len <= 9) { // definitely fits in int
_numTypesValid = NR_INT;
return (_numberInt = Integer.parseInt(_cleanedTextValue));
}
}
_parseNumericValue(NR_INT);
if ((_numTypesValid & NR_INT) == 0) {
convertNumberToInt();
}
return _numberInt;
}
代码示例来源:origin: FasterXML/jackson-dataformats-text
_numTypesValid = 0;
if (underscores > 0) {
return _cleanYamlInt(_textValue);
return _cleanYamlFloat(_textValue);
代码示例来源:origin: FasterXML/jackson-dataformats-text
_wrapError("Malformed numeric value '"+_textValue+"'", nex);
_wrapError("Malformed numeric value '"+_textValue+"'", nex);
_reportError("Current token ("+_currToken+") not numeric, can not use numeric value accessors");
内容来源于网络,如有侵权,请联系作者删除!