JSON Schema Generator - your thoughts and contributions.

396 views
Skip to first unread message

Redmeat

unread,
Apr 8, 2012, 5:45:23 PM4/8/12
to JSON Schema
Hello everyone,

I am newly joined to this group. Given the project I've been working
on I probably should have joined a sooner. I have been developing a
prototype / proof of concept for a JSON schema generator in my spare
time outside of my day-job. I would really like to you get some
feedback on the idea, general direction, and implementation so far.
An early prototype can be found at http://www.jsonschema.net. The
general idea is the tool does the leg-work of producing a schema
outline, and then makes it as easy as possible to add the extra
information or outright modify the schema structure. It is also
possible to load a JSON schema and edit it without ever having the
original JSON.

Any contributors will be acknowledged of course. My aim is to develop
a free-to-use, public tool and continue development in-line with
recommendations from the JSON schema community. I hope the effort
I've put into the project so far demonstrates my enthusiasm and drive
to get this tool fully developed.

Whether it's UI comments, code comments, or a gaping problem with the
entire idea, I would very much welcome feedback.

Thanks.

Francis Galiegue

unread,
Apr 9, 2012, 4:20:11 AM4/9/12
to json-...@googlegroups.com

I like the UI a lot, except that when highlighting an entry, the cross
at the top right unexpectedly suppresses the whole entry -- I'd rather
have had an explicit delete button somewhere ;) Like "Remove this
entry" or the like at the top left corner.

What language is that BTW?

--
Francis Galiegue, fgal...@gmail.com
"It seems obvious [...] that at least some 'business intelligence'
tools invest so much intelligence on the business side that they have
nothing left for generating SQL queries" (Stéphane Faroult, in "The
Art of SQL", ISBN 0-596-00894-5)

Json Schema

unread,
Apr 9, 2012, 6:09:56 AM4/9/12
to json-...@googlegroups.com
Hello  Francis,

It's written in JavaScript. Although I have plans for features which will probably require a server-side language. the benefits of keeping the implementation client side, are that the user doesn't have to worry about values being sent of HTTP, and the tool remains downloadable.

Jack

--
You received this message because you are subscribed to the Google Groups "JSON Schema" group.
To post to this group, send email to json-...@googlegroups.com.
To unsubscribe from this group, send email to json-schema...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/json-schema?hl=en.


Francis Galiegue

unread,
Apr 9, 2012, 6:19:00 AM4/9/12
to json-...@googlegroups.com
On Mon, Apr 9, 2012 at 12:09, Json Schema <jsons...@gmail.com> wrote:
> Hello  Francis,
>
> It's written in JavaScript. Although I have plans for features which will
> probably require a server-side language. the benefits of keeping the
> implementation client side, are that the user doesn't have to worry about
> values being sent of HTTP, and the tool remains downloadable.
>
> Jack
>

The main problem I have with a client side implementation is that the
client can modify it ;) Which is why I chose a server-side language
for implementation. Each approach has its advantages and drawbacks...

Json Schema

unread,
Apr 9, 2012, 6:34:04 AM4/9/12
to json-...@googlegroups.com
You are absolutely right about there being both disadvantages and advantages, but could you clarify the problem of the client modifying it?

I can't see a problem with someone modifying the code, as long as they  can't modify the publicly available tool that others use.

Francis Galiegue

unread,
Apr 9, 2012, 8:01:10 AM4/9/12
to json-...@googlegroups.com
On Mon, Apr 9, 2012 at 12:34, Json Schema <jsons...@gmail.com> wrote:
> You are absolutely right about there being both disadvantages and
> advantages, but could you clarify the problem of the client modifying it?
>
> I can't see a problem with someone modifying the code, as long as they
>  can't modify the publicly available tool that others use.
>

It's the last part: "[...] as long as they can't modify the publicly


available tool that others use."

Unless I am mistaken, there is no guarantee about this with
JavaScript, since the code is on the client side, and with the
appropriate tools, the client can modify it.

Sure, this is not simple to achieve. But it can be done.

Json Schema

unread,
Apr 9, 2012, 12:07:59 PM4/9/12
to json-...@googlegroups.com
Hello Francis,

I don't think I explained myself particularly well. All I meant was, an individual can't upload the modified JavaScript to http://www.josbschema.net - therefore they cannot modify the publicly available tool.

Thanks,
Jack

Armishev, Sergey

unread,
Apr 9, 2012, 1:13:14 PM4/9/12
to json-...@googlegroups.com

Jack,

I like your app and think it goes into the right direction.

-Sergey


_____________________________________________________
This electronic message and any files transmitted with it contains
information from iDirect, which may be privileged, proprietary
and/or confidential. It is intended solely for the use of the individual
or entity to whom they are addressed. If you are not the original
recipient or the person responsible for delivering the email to the
intended recipient, be advised that you have received this email
in error, and that any use, dissemination, forwarding, printing, or
copying of this email is strictly prohibited. If you received this email
in error, please delete it and immediately notify the sender.
_____________________________________________________

N. Morse

unread,
Apr 9, 2012, 2:22:54 PM4/9/12
to json-...@googlegroups.com
Ambitious project, great start.
Small bug: Descriptions in a given schema are striped of spaces when
the [Load schema] button is hit.

--Nate

Xample

unread,
Apr 10, 2012, 4:38:01 AM4/10/12
to json-...@googlegroups.com
nice work :-)

Gary Court

unread,
Apr 11, 2012, 3:33:47 PM4/11/12
to json-...@googlegroups.com
Great job! Nice looking tool.

--Gary

Json Schema

unread,
Apr 11, 2012, 4:29:33 PM4/11/12
to json-...@googlegroups.com
Hello,

Thank you to everyone who has taken a look and offered their thoughts. The two main themes of the feedback were:
  1. It's a good idea in general.
  2. Keeping the simple user-interface is important.
As I originally wrote, it's currently just a prototype, in fact it even had a serious bug involving accidental memory retention until about a week ago.  It is definitely proving to be an ambitious project.

I will work on getting a well implemented tool for a sub-set of the JSON Schema version 3 draft, and when I'm happy with it I'll post an update on this mailing list and hopefully expand to cover more of the draft.

Thank you again to everyone who took a look.

On 11 April 2012 20:33, Gary Court <gary....@gmail.com> wrote:
Great job! Nice looking tool.

--Gary
--
You received this message because you are subscribed to the Google Groups "JSON Schema" group.

Walter

unread,
Apr 12, 2012, 11:08:47 PM4/12/12
to json-...@googlegroups.com
Thank you to everyone who has taken a look and offered their thoughts. The two main themes of the feedback were:
  1. It's a good idea in general.
  2. Keeping the simple user-interface is important.
As I originally wrote, it's currently just a prototype, in fact it even had a serious bug involving accidental memory retention until about a week ago.  It is definitely proving to be an ambitious project.

I will work on getting a well implemented tool for a sub-set of the JSON Schema version 3 draft, and when I'm happy with it I'll post an update on this mailing list and hopefully expand to cover more of the draft.

Thank you again to everyone who took a look.

I took note but have only just had time to take a look.  Excellent tool!

If you could make it easier to create subschemas and link between them (not sure about others' opinion but this is a bit of a hassle for me right now) then I think this would be close to a perfect for JSON schema development.

One UI note: the 'Click to select' box with the JSON schema should scale its height when the left-side length exceeds that of the initial pageview.

Thanks for a useful tool.

- Walter

Json Schema

unread,
Apr 13, 2012, 3:49:37 AM4/13/12
to json-...@googlegroups.com
Thank you for your contribution Walter. I have to admit, my knowledge of JSON schema is limited. I have gone through the draft document, but more complex areas seem to be a little under-explained. Maybe I just need to re(read) it.  Are there any good resources other than this mailing list that would help get me up-to-speed on JSON Schema?

Regrading the UI, I hope it will change quite a lot, it's pretty clunky in places at the moment. In fact at the moment the 'Select All' panel has gone completely. I'll probably be adding a tab which displays a textarea containing the resulting schema.

Thank you for your contribution.  I really want to not crawl away into a cave and develop it in isolation, that to me is always a recipe for a disaster :)

Jack

--
You received this message because you are subscribed to the Google Groups "JSON Schema" group.
To view this discussion on the web visit https://groups.google.com/d/msg/json-schema/-/sYlXjzsq7l0J.

Walter

unread,
Apr 14, 2012, 3:18:44 AM4/14/12
to json-...@googlegroups.com
> Thank you for your contribution Walter. I have to admit, my knowledge of
> JSON schema is limited. I have gone through the draft document, but more
> complex areas seem to be a little under-explained. Maybe I just need to
> re(read) it.  Are there any good resources other than this mailing list that
> would help get me up-to-speed on JSON Schema?

The external schema notion doesn't seem to be really that widely
discussed, which is probably part of why it's hard to find examples
(I'm actually still not sure what the correct name for it is).

The links between schemas seem to come in a few ways:
- the 'extends' property (like a mixin or inherited subclass in OOP)
- the '$schema' property, section 5.29 in
http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.29 ...
which is a self-declaration of origin
- the use of URLs to

Anyway, as an example, the JSON Referencing 'json-ref' schema
download/example at http://json-schema.org/json-ref includes...

"$schema" : "http://json-schema.org/hyper-schema",
"id" : "http://json-schema.org/json-ref",

Essentially saying (I think): "I'm at http://json-schema.org/json-ref
and I'm 'something defined by', or alternatively 'an instance of'
http://json-schema.org/hyper-schema".

This is a bit confusing as functions as an example but also part of
the definition of the JSON Schema syntax.

Another example is the example 'Personal Card' schema
(http://json-schema.org/card) which includes references to two other
example schemas, the 'Geographic Coordinate' schema and the 'Address'
schema, simply by using a URL in place of an inline schema definition:

"adr":"http://json-schema.org/address",
"geo":"http://json-schema.org/geo",

- Walter

Francis Galiegue

unread,
Apr 14, 2012, 3:36:26 AM4/14/12
to json-...@googlegroups.com
On Sat, Apr 14, 2012 at 09:18, Walter <wal...@pratyeka.org> wrote:
[...]

This is known to be incorrect. The syntax should be:

"adr": {
"$ref": "http://json-schema.org/address#"
},
"geo": {
"$ref": "http://json-schema.org/geo#"
},

The # at the end is not required, though. It is essentially a JSON
Pointer referring to the root of the document at this particular
location.

Reply all
Reply to author
Forward
0 new messages