Questions tagged [jackson-dataformat-yaml]

Support for reading and writing YAML-encoded data via Jackson abstractions.

Jackson module to add YAML backend (parser/generator adapters).

See https://github.com/FasterXML/jackson-dataformats-text.

15 questions
9
votes
3 answers

Object Mapper - YAMLFactory - exception due to missing _createContentReference method

I'm using the latest 2.13.0 version of jackson, and when I try to parse a YAML file, I'm getting this exception java.lang.NoSuchMethodError: 'com.fasterxml.jackson.core.io.ContentReference…
eja
  • 4,677
  • 3
  • 21
  • 30
3
votes
0 answers

jackson-dataformat-yaml cant parse to json on version 2.13.x

On using jackson version 2.13.2 com.fasterxml.jackson.dataformat jackson-dataformat-yaml 2.13.2 I get the…
jtkSource
  • 675
  • 9
  • 21
1
vote
0 answers

Kotlin Serialize object to YAML where YAML node should be a value

Jackson contains YAML Dataformat module, which helps to work with this format. The example and tests in the repository are quite straighforward. However, I have a case that I struggle to implement at the moment. Let's say I have a structure: …
edward_wong
  • 442
  • 7
  • 21
1
vote
1 answer

Deserializing YAML with root name prefix using Jackson

I would like to deserialize a YAML file into a Java object using Jackson and jackson-dataformat-yaml. The YAML is company: product: settings: property: value The target class is @Getter @Setter public class TargetObject { private…
Rokko_11
  • 837
  • 2
  • 10
  • 24
1
vote
1 answer

Reactive way of reading YAML with Jackson using Spring boot webflux

The yamlObjectMapper in configuration @Bean public ObjectMapper yamlObjectMapper() { ObjectMapper yamlObjectMapper = new ObjectMapper(new YAMLFactory().disable(YAMLGenerator.Feature .WRITE_DOC_START_MARKER)); …
1
vote
0 answers

Jackson YAML Merge Operator Deserialization Wrong

I'm using Jackson to serialize and deserialize YAML but I'm encountering a problem with deserializing merge operator. For example: - &item001 boolean: true integer: 7 float: 3.14 - &item002 boolean: false - <<: [ *item002, *item001 ] This…
Luca
  • 322
  • 4
  • 19
0
votes
0 answers

Jackson YAML Serialization with and without quotes

I am trying to Serialize YAML where I need some String field values with quotes and some without quotes (Raw) like name: "John" department: Finance I am able to achieve the no quotes…
0
votes
0 answers

Error when updating Quarkus to 3.1.3: java.lang.NoSuchMethodError: 'com.fasterxml.jackson.core.StreamReadConstraints

I'm trying to update from Quarkus 2.14 to 3.1.3, but I'm getting this error: [ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:3.1.3.Final:build (default) on project app: Failed to build quarkus application:…
0
votes
1 answer

YAMLMapper MismatchedInputException YAML key with periods

Error: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input Yaml file: formatting.template: fields: - name: birthdate type: java.lang.String subType: java.util.Date lenght:…
Paul Marcelin Bejan
  • 990
  • 2
  • 7
  • 14
0
votes
1 answer

Jackson + YAML for Not A Number (.NAN)

Per the YAML spec, Not-a-number is represented as .NAN https://yaml.org/refcard.html However, when deserialized with jackson-dataformats-text's YAMLMapper, we get: Malformed numeric value '.NAN' How do you tell an ObjectMapper to accept a given…
J. Dimeo
  • 262
  • 2
  • 10
0
votes
1 answer

How to map a list in yaml to java object using jackson so that parent node values can be returned?

I'm using jackson in my java project com.fasterxml.jackson.dataformat jackson-dataformat-yaml 2.10.3 I…
TrongBang
  • 923
  • 1
  • 12
  • 23
0
votes
1 answer

Read YAML file like properties

I am developing a spring boot project, and I need some external configuration. So I am storing that in a file called "config.yml" placed in "src/main/resources" folder. Now I want the properties in config.yml to be injected in my class. Now if we…
Manoj Majumdar
  • 505
  • 1
  • 4
  • 23
0
votes
1 answer

YAML parsing question for strangely formatted text

I am trying to parse a bit of yaml, and I cannot figure out what construct I need to read it with a YAML parser....I've simplified it here: name: Test User age: 30 address: /home/joe: post: summary: My summary But no matter what I do,…
0
votes
1 answer

YAML Validation in java failing

I am getting following error when trying to validate json data using YAML schema. I am using networknt library as given here com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAMLException: mapping values are not allowed here in…
Sajin Surendran
  • 248
  • 6
  • 17
-1
votes
1 answer

while parsing YML to POJO getting exception Invalid UTF-8 start byte 0x80 (at char #158, byte #-1)

I am trying to parse yml file into java object while parsing yml file with object mapper getting below exception. Exception in thread "main" com.fasterxml.jackson.dataformat.yaml.JacksonYAMLParseException: java.io.CharConversionException: Invalid…