From: Trans <transfire@gm...> - 2012-08-06 20:10:29
On Mon, Aug 6, 2012 at 1:51 PM, Ingy dot Net <ingy@...> wrote:
> JSON *is* YAML. You can't embrace YAML without supporting JSON :)
JSON *is* "Simple YAML". If I use tags it's no longer "JSONable".
> Also, what about JSYNC? http://jsync.org
It's funny you should mention it b/c I just thought of that too. And I
think I might go that route b/c I also realized that I can't guarantee
that a YAML implementation won't throw an error if it doesn't
recognize a tag. Ruby's Psych will just ignore it, but I don't think
there is any kind of standard around that behavior is there?
> Both of these examples drive home the need for YAML/JSON/JSYNC schema.
If there were a YPath to work with (and in my case I need a Ruby
implementation), I think I could have the YES schema project I've been
working on in beta shape in only a few days.
I also discovered this:
http://tools.ietf.org/html/draft-zyp-json-schema-03, which looks like
it has a few ideas I can use to polish off YES.
From: Trans <transfire@gm...> - 2012-08-06 21:33:24
On Mon, Aug 6, 2012 at 12:36 PM, john saylor <js0000@...> wrote:
> maybe thinking of trade-offs will help. what do you lose by dropping
> json support?
I wan to make it as easy as possible for people to access this data.
Ideally they only need to do `YAML.load_file(file_name)` (in Ruby),
and they have all the info they need. Thinking about it that way makes
me realize that tags probably won't work anyway because the consuming
application would have to be setup already to comprehend them --
Ruby's YAML implementation uses global registration to handle tags and
doesn't provide a way to simply query this information after loading.
That sucks. I don't know, but I assume it is the same for other
On the emitter side, if an app wants to generate the metadata files
they could output JSON instead of YAML and it would be okay since JSON
is a subset of YAML.
I am still debating whether to use extensions `.yaml` or `.json` for
these files, or just require that YAML always be used to load them and
not require an extension.