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

Put the linkset array inside an object #103

Open
BigBlueHat opened this Issue Aug 22, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@BigBlueHat
Copy link

BigBlueHat commented Aug 22, 2018

Using an array as your top-level container cuts of the opportunity to add information about all the items in the array, it's provenance, extensions, etc. It greatly limits what's possible.

Consider reshaping:

   [ { "href"   : "http://example.com/foo",
       "anchor" : "http://example.net/bar",
       "rel"    : [ "next" ] },
     { "href"   : "http://example.com/foo",
       "anchor" : "http://example.net/bar",
       "rel"    : [ "http://example.net/linkrel" ] } ]

to:

{
  "linkset":
   [ { "href"   : "http://example.com/foo",
       "anchor" : "http://example.net/bar",
       "rel"    : [ "next" ] },
     { "href"   : "http://example.com/foo",
       "anchor" : "http://example.net/bar",
       "rel"    : [ "http://example.net/linkrel" ] } ]
}

This opens the door to far more extensibility and clarity than the current "direct array" format.

Cheers!
🎩

@dret dret added the linkset label Aug 24, 2018

@dret

This comment has been minimized.

Copy link
Owner

dret commented Aug 25, 2018

@csarven

This comment has been minimized.

Copy link
Contributor

csarven commented Jan 27, 2019

Just jumping in to agree with @BigBlueHat 's proposal being a bit more useful - easier to create, manipulate.

@hvdsomp

This comment has been minimized.

Copy link
Collaborator

hvdsomp commented Jan 27, 2019

Yes, I am definitely in support of this too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment