Proposal: Change rel and class values from string-separated token to arrays

80 views
Skip to first unread message

Kevin Swiber

unread,
Aug 6, 2012, 11:35:56 AM8/6/12
to siren-hy...@googlegroups.com
Howdy, folks!

I've been doing some work creating a client and server implementation with Siren.  One pain point is constantly switching between string-separated token and arrays for rel and class values.  I'm proposing we just make them arrays in JSON and kill the hassle.


And here's the Pull Request if you'd like to comment there and see the changes:  https://github.com/kevinswiber/siren/pull/1

Please let me know your feedback!  I think this will be a good win.


Thanks,

--
Kevin Swiber
Projects: https://github.com/kevinswiber
Twitter: @kevinswiber

Pat Cappelaere

unread,
Aug 6, 2012, 2:03:28 PM8/6/12
to siren-hy...@googlegroups.com
Kevin,

I am just kinda torn as I am trying to make sense out of this.
I like your approach but I am trying to look at it from a different perspective.
In my mind, hypermedia is not orthogonal to discovery but complementary.
I do see the importance of a good discovery document that documents the API in a machine readable format with matching schemas.
Once that document is published, the application needs to define/use a mime-type.
Your recommendation seems to be: application/vnd.siren+json.
But wouldn't it be more likely to be something like: 
application/vnd.myapp+json; describedby=myschema.rnc

The JSON format would still be Siren-like.. I think… may be with some additional simplification since a schema is also available…

I would like to get your feedback on this.
Many thanks,
Pat.




--
You received this message because you are subscribed to the Google Groups "Siren Hypermedia" group.
To post to this group, send email to siren-hy...@googlegroups.com.
To unsubscribe from this group, send email to siren-hypermed...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Kevin Swiber

unread,
Aug 9, 2012, 6:59:40 PM8/9/12
to siren-hy...@googlegroups.com
FYI: This Pull Request has been merged.  Class and rel values are now arrays in JSON Siren.
Reply all
Reply to author
Forward
0 new messages