Message from discussion
json schema to "human readable" layout
Received: by 10.59.0.194 with SMTP id ba2mr6223390ved.19.1351076720077;
Wed, 24 Oct 2012 04:05:20 -0700 (PDT)
X-BeenThere: json-schema@googlegroups.com
Received: by 10.52.21.40 with SMTP id s8ls1864935vde.8.gmail; Wed, 24 Oct 2012
04:05:18 -0700 (PDT)
Received: by 10.52.93.132 with SMTP id cu4mr2739502vdb.14.1351076718666;
Wed, 24 Oct 2012 04:05:18 -0700 (PDT)
Date: Wed, 24 Oct 2012 04:05:18 -0700 (PDT)
From: "Geraint (David)" <geraintl...@gmail.com>
To: json-schema@googlegroups.com
Message-Id: <a7144470-471e-4772-bf19-d5e7dbb66e19@googlegroups.com>
In-Reply-To: <56b09268-f1ac-477a-969a-57a1a592f233@googlegroups.com>
References: <b98d403f-6fc2-4c08-9c53-4feebd6a327e@googlegroups.com>
<fe8c54a7-8bb0-4677-a4da-61e3aef8017b@googlegroups.com> <440dae38-ec0e-4d60-bf61-b70d004768f3@googlegroups.com>
<ae9dddde-9a13-407c-b2b4-2d286ca9f266@googlegroups.com> <45854b09-cebf-4f83-846e-6e5e5a50d31e@googlegroups.com>
<ba811847-7f4a-42ec-aa4c-131f0dca266b@googlegroups.com> <d867f391-22b1-44b4-966c-0438de0ef579@googlegroups.com>
<CAOEeopgfGkfiK=P3Ct-qASeM+xMcX88dnru-C0FTaCvcTZew2w@mail.gmail.com> <bd2ff66b-5ebf-4f1c-a77e-62836b70c3fa@googlegroups.com>
<CAOEeopi26Xo7+LbETX5J88bC9zsppP5+1mnnDC+8g1Aw5t0-oQ@mail.gmail.com>
<56b09268-f1ac-477a-969a-57a1a592f233@googlegroups.com>
Subject: Re: [json-schema] Re: json schema to "human readable" layout
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_462_15077824.1351076718355"
------=_Part_462_15077824.1351076718355
Content-Type: multipart/alternative;
boundary="----=_Part_463_9923924.1351076718355"
------=_Part_463_9923924.1351076718355
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
In fact: https://gist.github.com/3945460
That's just a hacked-together quick solution, but it highlights schema
properties in green, except for the sub-properties of "properties" (which
it highlights blue), and the values of "default" and "enum" which are all
plain black.
I think that if you have problems with readability, some tactical
highlighting like that is probably a better solution than large-scale
changes to the standard.
On Wednesday, October 24, 2012 11:35:35 AM UTC+1, Geraint (David) wrote:
>
> Basically, you're proposing we change every single keyword, which is a
> huge change to the spec.
>
> It would add a lot of boilerplate code to any tool that deals with JSON
> Schema, and I don't think it's worth it for a subjective readability
> improvement (that ends up more confusing if we are describing a JSON format
> with underscores in).
>
> If you want that kind of readability, I reckon you could create a syntax
> highlighter in less than 100 lines of JavaScript.
>
> On Wednesday, October 24, 2012 9:44:46 AM UTC+1, prasadgc wrote:
>>
>> We don't have to fracture available tools. Just add the variants with
>> underscores to the spec with the recommendation that this is the preferred
>> format, and deprecate the non-underscore equivalents over time.
>>
>> Regards,
>> Ganesh
>>
>
------=_Part_463_9923924.1351076718355
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
In fact: <a href=3D"https://gist.github.com/3945460">https://gist.gith=
ub.com/3945460</a><div><br></div><div>That's just a hacked-together quick s=
olution, but it highlights schema properties in green, except for the sub-p=
roperties of "properties" (which it highlights blue), and the values of "de=
fault" and "enum" which are all plain black.</div><div><br></div><div>I thi=
nk that if you have problems with readability, some tactical highlighting l=
ike that is probably a better solution than large-scale changes to the stan=
dard.<br><br>On Wednesday, October 24, 2012 11:35:35 AM UTC+1, Geraint (Dav=
id) wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left:=
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Basically, you're pr=
oposing we change every single keyword, which is a huge change to the spec.=
<div><br></div><div>It would add a lot of boilerplate code to any tool that=
deals with JSON Schema, and I don't think it's worth it for a subjective r=
eadability improvement (that ends up more confusing if we are describing a =
JSON format with underscores in).</div><div><br></div><div>If you want that=
kind of readability, I reckon you could create a syntax highlighter in les=
s than 100 lines of JavaScript.<br><div><div><br>On Wednesday, October 24, =
2012 9:44:46 AM UTC+1, prasadgc wrote:<blockquote class=3D"gmail_quote" sty=
le=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1e=
x">We don't have to fracture available tools. Just add the variants with un=
derscores to the spec with the recommendation that this is the preferred fo=
rmat, and deprecate the non-underscore equivalents over time.<div><br></div=
>
<div>Regards,</div><div>Ganesh<br></div>
</blockquote></div></div></div></blockquote></div>
------=_Part_463_9923924.1351076718355--
------=_Part_462_15077824.1351076718355--