Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing support for multiple yaml documents in a single file. #1848

Closed
hemanik opened this issue Dec 4, 2017 · 2 comments
Closed

Missing support for multiple yaml documents in a single file. #1848

hemanik opened this issue Dec 4, 2017 · 2 comments

Comments

@hemanik
Copy link

hemanik commented Dec 4, 2017

yaml spec v1.2 contained information about files with multiple documents:
http://www.yaml.org/spec/1.2/spec.html

YAML uses three dashes (“---”) to separate directives from document content. This also serves to signal the start of a document if no directives are present. Three dots ( “...”) indicate the end of a document without starting a new one, for use in communication channels.

Example:

# Ranking of 1998 home runs
---
- Mark McGwire
- Sammy Sosa
- Ken Griffey

# Team ranking
---
- Chicago Cubs
- St Louis Cardinals

Example with ...:

---
time: 20:03:20
player: Sammy Sosa
action: strike (miss)
...
---
time: 20:03:47
player: Sammy Sosa
action: grand slam
...

The above mentioned structures are not supported by object mapper at the moment.

@cowtowncoder
Copy link
Member

Please file YAML specific issues under jackson-dataformats-text: this module only handlers format-independent functionality. Handling of multiple logical documents is supported, at high level, by ObjectMapper (or more specifically, by MappingIterator created via ObjectReader).
But it is possible YAMLParser might not handle multi-document input, even if SnakeYAML (which is used as decoder) may support it.

@cowtowncoder
Copy link
Member

Refiled at: FasterXML/jackson-dataformats-text#66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants