lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 20 May 2015 at 20:06, Javier Guerra Giraldez <javier@guerrag.com> wrote:
> On Wed, May 20, 2015 at 1:58 PM, Matthew Wild <mwild1@gmail.com> wrote:
>> So it would be ok to request a JSON processor that has to correctly
>> modify a JSON document while preserving things irrelevant to the data
>> - like whitespace, whether key names are quoted, and what kind of
>> quotes are used?
>
>
> nitpicking: JSON mandates all keys to be quoted, and only double
> quotes are valid.  the only "style" variations allowed are whitespace
> and field order.

I know that. But almost every JSON implementation is willing to accept
a random combination of these violations (some don't require any
string to be quoted). But it's XML that is a mess :)

Data storage formats are like programming languages, text editors and
operating systems - doomed to suffer the "latest cool thing" trends
and spark flame wars until the end of time.

> unfortunately.... in XML some of those things are not non-significant.
> mostly because schizophrenic nature of XML, where it can be a text
> document with annotations or a data structure.  the requirements for
> each are very different, so a general tool might have to preserve
> things that many uses consider irrelevant.

Mixing human-generated content with machine-generated content in the
same document that way never turns out nicely :)

Regards,
Matthew