Re: User Hypermedia format
Matt McClure <[email protected]> Thu, 27 Feb 2014 13:40:26 -0500
| Newsgroups | gmane.comp.web.services.rest |
|---|---|
| Message-ID | <CAJELnLGS+n4PZ2GMenyf=Z9t1nePsZM+KiwPrf8ASFdfxWR2Ng@mail.gmail.com> |
Mike, On Monday, February 24, 2014, mike amundsen <[email protected]> wrote: > 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. > How does the XML format represent true, false, and null? How does the XML format represent objects and arrays? (Some sadist will put JSON in there unless we have a better answer.) More generally, I imagine your intent is to constrain clients to adopt more of a tolerant reader approach and use less automatic serialization and deserialization. At the same time, I think there's potential value in making compound, complex data more of a first class citizen. Allowing bare object and array data representations (not serialized into a quoted string) would let clients and servers reach inside the data without additional explicit deserialization steps. I guess one risk of allowing objects and arrays is the antipattern of using a single data element whose value is a very complex object. What are the tradeoffs you're trying to balance? Matt -- Matt McClure http://matthewlmcclure.com http://www.mapmyfitness.com/profile/matthewlmcclure