Really? Like really really? I don't want to belittle software I know
little about, but it seems like a very small API footprint that needs
to be validated.
-- tim
> We originally supported 4 formats: xml, yaml, json, and url-encoded
> params. In each of these formats, there were situations in which the
> Rails params parser would raise exceptions, or we'd get slightly
> different data than we expected. In order to ensure that all four
> formats continue to work, we'd need to maintain integration tests for
> every situation in each format. We'd also need to update all the
> tests, documentation, and code for four formats each time we updated
> the API in any way.
I agree on dropping multiple-format.
Is XSD going to save your chops though? An XSD doesn't count for
friendly API documentation, so you're either going to have to generate
and maintain separate docs or write code to generate the docs based on
the XSD.
> Considering none of the formats had any major
> merits over any of the others, we've decided that this flexibility was
> not worth maintaining.
The advantage JSON has over XML is that JSON can be represented as
arrays, hashs and strings, so it's extremely easy to generate, handle
and wrap in a library.
With it's element attributes, XML will always need HAML or Builder or
*insert other library here* in languages without language-level XML
support, to both generate and represent the data.
> It may seem like validation is a small part of
> the picture, but every piece of extra code is code we have to
> maintain.
I hear ya!
-- tim