From dmitri at redhat.com Mon Jun 28 15:25:44 2010 From: dmitri at redhat.com (Dmitri Dolguikh) Date: Mon, 28 Jun 2010 12:25:44 -0300 Subject: [rest-practices] support for xml in rest api Message-ID: <4C28BEF8.4040801@redhat.com> Hey everybody, In candlepin (candlepin.fedorahosted.org) project we are considering dropping support for xml representation of resources in favour of json-only. What's your opinion? Thanks, -Dmitri -------------- next part -------------- An HTML attachment was scrubbed... URL: From bburke at redhat.com Mon Jun 28 17:28:53 2010 From: bburke at redhat.com (Bill Burke) Date: Mon, 28 Jun 2010 13:28:53 -0400 Subject: [rest-practices] support for xml in rest api In-Reply-To: <4C28BEF8.4040801@redhat.com> References: <4C28BEF8.4040801@redhat.com> Message-ID: <4C28DBD5.9030203@redhat.com> From a Java perspective, there are pro's and con's. * Java has nice tools from which you can generate Java classes from XML schema * JAXB is good if you don't want to extend it with custom functionality * The Jackson JSON plugin works pretty well, they do have some degree of JSON-schema support, but I don't know if they have a code generator. Dmitri Dolguikh wrote: > Hey everybody, > > In candlepin (candlepin.fedorahosted.org) project we are considering > dropping support for xml representation of resources in favour of > json-only. What's your opinion? > > Thanks, > -Dmitri > > > ------------------------------------------------------------------------ > > _______________________________________________ > rest-practices mailing list > rest-practices at redhat.com > https://www.redhat.com/mailman/listinfo/rest-practices -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com From bburke at redhat.com Tue Jun 29 21:06:27 2010 From: bburke at redhat.com (Bill Burke) Date: Tue, 29 Jun 2010 17:06:27 -0400 Subject: [rest-practices] dumping link headers Message-ID: <4C2A6053.1090701@redhat.com> Awhile back I blogged about dumping Link headers in favor of just putting a URL within a custom header: http://bill.burkecentral.com/2009/10/14/link-headers-vs-custom-headers/ I think I'm going to go ahead with link headers for the RESTful interfaces I'm doing. The thing is, no client framework that I know of supports link headers and a small, but untrivial, piece of code would have to be written to support link header parsing for each language that would consume my RESTful interfaces. So, what I'm going to do is use custom headers instead and make Link header usage optional and see who wins. The custom headers would look like: : http://.../my/link -Type: application/xml i.e. Transaction: http://.../tm/tx/1234 Transaction-Type: application/tx+xml Consume-Next: http://../next/message Thoughts on ditching link headers in favor of custom HTTP headers? -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com From sberyozk at redhat.com Wed Jun 30 09:08:55 2010 From: sberyozk at redhat.com (Sergey Beryozkin) Date: Wed, 30 Jun 2010 05:08:55 -0400 (EDT) Subject: [rest-practices] dumping link headers In-Reply-To: <1634492425.1570661277888781813.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <540039002.1570781277888935577.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Hi As far as the user's experience is concerned, what would be the difference between dealing with related pairs of custom headers (or complex Link header) and say some custom XMl/JSON response body representing the same information ? Using Name & Name-Type convention is simple and easy on the eye, it looks fine, but this approach is probably less likely to work well with generic clients ? Link might do better cheers, Sergey ----- Original Message ----- From: "Bill Burke" To: rest-practices at redhat.com Sent: Tuesday, June 29, 2010 10:06:27 PM GMT +00:00 GMT Britain, Ireland, Portugal Subject: [rest-practices] dumping link headers Awhile back I blogged about dumping Link headers in favor of just putting a URL within a custom header: http://bill.burkecentral.com/2009/10/14/link-headers-vs-custom-headers/ I think I'm going to go ahead with link headers for the RESTful interfaces I'm doing. The thing is, no client framework that I know of supports link headers and a small, but untrivial, piece of code would have to be written to support link header parsing for each language that would consume my RESTful interfaces. So, what I'm going to do is use custom headers instead and make Link header usage optional and see who wins. The custom headers would look like: : http://.../my/link -Type: application/xml i.e. Transaction: http://.../tm/tx/1234 Transaction-Type: application/tx+xml Consume-Next: http://../next/message Thoughts on ditching link headers in favor of custom HTTP headers? -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com _______________________________________________ rest-practices mailing list rest-practices at redhat.com https://www.redhat.com/mailman/listinfo/rest-practices