Re: Re: Internet-Draft: JSON Hypertext Application Language

Mike Kelly <[email protected]>
Newsgroups gmane.comp.web.services.rest
Message-ID <CANqiZJbk4Mb7-e64pYyJp3jyuoLYLa-heaa30YLK48L5tKzobg@mail.gmail.com>
Hi Francios,

I actually started out intiially with this design. The problem I found was
that it wasn't very good for readability, and some people just seemed to
find it confusing. So I opted to split them into two different elements.

I think having them as two distinct elements improves the aesthetics of the
type and doesn't add too much in terms of additional complexity.

Cheers,
M


On Fri, Jun 8, 2012 at 3:18 PM, François Verry <[email protected]> wrote:

> **
>
>
> > what goal does the "_links" special attribute serves ? couldn't links be
> > considered as "empty embedded resources" ?
>
> To comment on my own comment, this is even more simple into the XML
> representation :
>
> <resource href="/orders">
>   <link rel="next" href="/orders?page=2" />
>   <link rel="search" href="/orders?id={order_id}" />
>   <resource rel="order" href="/orders/123">
>     <link rel="customer" href="/customer/bob" title="Bob Jones
> <[email protected]> <[email protected]>" />
>     <resource rel="basket" href="/orders/123/basket">
>       ...
>     </resource>
>   </resource>
> </resource>
>
> Could as well be :
>
> <resource href="/orders">
>   <resource rel="next" href="/orders?page=2" />
>   <resource rel="search" href="/orders?id={order_id}" />
>   <resource rel="order" href="/orders/123">
>     <resource rel="customer" href="/customer/bob" title="Bob Jones
> <[email protected]> <[email protected]>" />
>     <resource rel="basket" href="/orders/123/basket">
>       ...
>     </resource>
>   </resource>
> </resource>
>
> ++
> François
>
>
>   
>



-- 
Mike

http://twitter.com/mikekelly85
http://github.com/mikekelly
http://linkedin.com/in/mikekelly123
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.