Package com.fasterxml.jackson.dataformat.yaml

Examples of com.fasterxml.jackson.dataformat.yaml.YAMLParser


    try {
      if (byteSource.isEmpty()) {
        node = JsonNodeFactory.instance.objectNode();
      } else {
        try (InputStream inputStream = configurationSource.getByteSource().openBufferedStream()) {
          YAMLParser yamlParser = yamlFactory.createParser(inputStream);
          node = objectMapper.readTree(yamlParser);
        }
      }
      return build(configurationClass, node);
    } catch (IOException ex) {
View Full Code Here


    }

    @Override
    protected void writeObjectRaw(String fieldName, BytesReference content, OutputStream bos) throws IOException {
        writeFieldName(fieldName);
        YAMLParser parser;
        if (content.hasArray()) {
            parser = YamlXContent.yamlFactory.createParser(content.array(), content.arrayOffset(), content.length());
        } else {
            parser = YamlXContent.yamlFactory.createParser(content.streamInput());
        }
        try {
            parser.nextToken();
            generator.copyCurrentStructure(parser);
        } finally {
            parser.close();
        }
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.dataformat.yaml.YAMLParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.