Re: User Hypermedia format
mike amundsen <[email protected]> Mon, 24 Feb 2014 00:34:42 -0500
| Newsgroups | gmane.comp.web.services.rest |
|---|---|
| Message-ID | <CAPW_8m5pn5X9kjaaoisJ=LAOOkRXmJRUC=jLX9v3cADRKeaJJQ@mail.gmail.com> |
Matt: I reviewed the JSON serializations and made a couple corrections. thanks for the catch and would appreciate your scan again to catch any remaining problems. I've also added some text to the "value" definition to say JSON format MUST only be set to string, number, or literals (true, false, null) and MUST NOT be set to object or array. What is then implied (not yet stated in the prose) is that, to pass arrays or objects in the "value" attribute, you need to *escape* the object/array and pass as a string. Does this make sense? mamund +1.859.757.1449 skype: mca.amundsen http://amundsen.com/blog/ http://twitter.com/mamund https://github.com/mamund http://linkedin.com/in/mamund On Sun, Feb 23, 2014 at 10:41 PM, mike amundsen <[email protected]> wrote: > hmm... > > yes, it's implied, but not clear and possibly not right. in XML innerText > is "untyped" unless more info is provided (via the message or a schema). in > JSON it's easier to express type w/o metadata ("value":13}, > {"value":false}, "value":"mike"}). > > hmm.... > > what's the smart thing to do here (given i'd like to keep fidelity across > serilization formats as much as possible)? > > > > > mamund > +1.859.757.1449 > skype: mca.amundsen > http://amundsen.com/blog/ > http://twitter.com/mamund > https://github.com/mamund > http://linkedin.com/in/mamund > > > On Sun, Feb 23, 2014 at 8:50 PM, Matt McClure <[email protected]>wrote: > >> >> >> Hi Mike, >> >> Are the values of "value" properties always strings? It looks so in all >> the examples, but I don't see that explicitly stated. >> >> Matt >> >> >> >> On Sun, Feb 23, 2014 at 8:35 PM, mike amundsen <[email protected]> wrote: >> >>> >>> >>> /* pardon the cross-posting */ >>> >>> I just published a first working draft of a new hypermedia format I am >>> (humbly) calling "Uber Hypermedia"[1]. I'm maintaining it in github[2] >>> where you can post issues, clone/PR, etc. if you like. >>> >>> It is designed to be *very* minimal. It has only three elements, 11 >>> attributes, and seven reserved strings. >>> >>> Here is some text from the opening: >>> <snip> >>> The Uber message format is a minimal read/write hypermedia type designed >>> to support simple state transfers and ad-hoc hypermedia-based transitions. >>> This document describes both the XML and JSON variants of the format and >>> provides guidelines for supporting Uber messages over the HTTP protocol. >>> >>> The Uber message model has a number of design goals: >>> - Keep the message structure as lean as possible. >>> - Support all the H-Factors [HFactor] in hypermedia controls. >>> - Be compatible with multiple protocols (e.g. HTTP, CoAP, etc.) >>> - Maintain fidelity for more than one base message format (XML, JSON, >>> etc.) >>> </snip> >>> >>> I'm looking for any/all feedback here or in the repo space. Thanks in >>> advance. >>> >>> >>> [1] https://rawgithub.com/mamund/media-types/master/uber-hypermedia.html >>> [2] https://github.com/mamund/media-types >>> <https://github.com/mamund/media-types> >>> >>> mamund <https://github.com/mamund/media-types> >>> +1.859.757.1449 >>> skype: mca.amundsen >>> <https://github.com/mamund/media-types>http://amundsen.com/blog/ >>> http://twitter.com/mamund >>> https://github.com/mamund >>> http://linkedin.com/in/mamund >>> >>> >>> >> >> >> -- >> Matt McClure >> http://matthewlmcclure.com >> http://www.mapmyfitness.com/profile/matthewlmcclure >> >> >> >> > >