couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Lenz <cml...@gmx.de>
Subject Re: 0.11.x futon storage
Date Tue, 23 Feb 2010 16:20:13 GMT
Hi Matt,

On 23.02.2010, at 14:25, Matt Goodall wrote:
> 2. Implicit type conversion. Doc attribute values are now implicitly
> converted to some type of Futon's choosing. I'm guessing this is deliberate
> but, IMHO, it's just awful. It's easy to come up with contrived examples,
> e.g. try changing "1" to 1 or changing "[]" to "[100]", but I managed to end
> up with a {} getting stored as a string somehow (although I can't repeat it
> again) and it broke my application.

The motivation for this was to make editing text less painful. Not having to escape quotes
and line breaks means it's now actually possible to edit fields containing longer strings
without pulling your hair out.

The implementation is simple: Anything that doesn't parse as valid JSON is automatically treated
as a string. I'm not going to claim that that this approach is perfect, and there are certainly
cases where it's unexpected or annoying.

Just saying that IMHO there is a pretty large benefit to this approach when trying to edit
text fields.

Cheers,
--
Christopher Lenz
  cmlenz at gmx.de
  http://www.cmlenz.net/


Mime
View raw message