Am Tue, 26 Aug 2014 13:47:05 +0300
schrieb ketmar via Digitalmars-d <digitalmars-d@puremagic.com>:

> On Tue, 26 Aug 2014 10:36:14 +0000
> eles via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> 
> > Not exactly that, but look here two approaches for introducing 
> > comments in standard JSON:
> they both 'hacks'. and i'm pretty sure that most people who using JSON
> never bother to read specs, they just expect it to work "like
> javascript". i myself wasn't aware about JSON limitations when i was
> writing my own JSON parser, so my parser allows comments and unquoted
> field names from the beginning.

It depends on the personality of the person looking into
it. Diligent people, when faced with something that looks like
something else, first drop that notion to avoid taking
incorrect shortcuts subconsciously. Then they read the official
documentation until they can't imagine any more questions
and corner cases of the kind "Is there a length limitation for
numbers? How do i deal with overflow? Are other encodings than
Unicode allowed?"

But in the end it comes down to the robustness principle:
Be conservative in what you do,
be liberal in what you accept from others.

-- 
Marco

Attachment: signature.asc
Description: PGP signature

Reply via email to