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

Hyperlinks #4

Open
trans opened this issue Nov 26, 2012 · 1 comment
Open

Hyperlinks #4

trans opened this issue Nov 26, 2012 · 1 comment

Comments

@trans
Copy link
Member

trans commented Nov 26, 2012

YAML already supports an internal link notation.

defaults: &defaults
  correspondence_address:
    street: '100 W Hubbard'
    city: 'New York'
    state: NY
development:
  <<: &defaults
  billing_address:
    street: '100 W Hubbard'
  ...

Could YAML support external links as well? Either or both, local files:

development:
  <<: &./foo.yaml/defaults
  billing_address:
    street: '100 W Hubbard'
  ...

And over the wire:

development:
  <<: &http://foo.org/foo.yaml/defaults
  billing_address:
    street: '100 W Hubbard'
  ...
@shoogle
Copy link

shoogle commented Jul 6, 2019

Native links don't survive round-trip YAML parsing (i.e. read YAML, interprete YAML, dump YAML) because they get replaced by the content they point to. I would prefer to see all kind of links dropped (including internal references) and string being the only supported data type. This is one of the many improvements made in StrictYAML (see #8). Note that non-string data types (including links) can still be supported as part of a schema.

If links are natively supported, with content returned by default, then there needs to be a mechanism to query whether an object is a link and to return the link text instead, like with filesystem symlinks.

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