News for hackers. Stuff that matters.
Re:Write JSON Schema in Markdown (MSON proposal) by rdwallis on Thursday April 10, 2014 @11:41AM (#7567129)
What problem do you have that MSON solves?
Re:Write JSON Schema in Markdown (MSON proposal) by zdne on Thursday April 10, 2014 @11:56AM (#7567263)
As discussed in the MSON README - there is this Markdown format for documenting APIs; discussing / describing API payloads and resources in JSON Schema felt complex and not suiting well the settings of a Markdown document.

Besides some payloads are not just a JSON. So there is a need to describe these data in a media-type agnostic form.

Re:Write JSON Schema in Markdown (MSON proposal) by rdwallis on Thursday April 10, 2014 @12:07PM (#7567372)
Ok sorry if my question came off as snarky, the first example in your readme shows how mson can be converted to json which doesn't seem to be very useful.

I think you should better highlight the connection to json schema.

Also json schema is new to me. Any examples of it being used in the wild?

Re:Write JSON Schema in Markdown (MSON proposal) by Almad on Thursday April 10, 2014 @11:52AM (#7567228)
Writing JSON Schema by hand and embedding it into Markdown sucks. MSON provides a Markdown-compatible way.
Re:Write JSON Schema in Markdown (MSON proposal) by wtetzner on Thursday April 10, 2014 @11:45AM (#7567166)
Writing JSON by hand sucks?
Re:Write JSON Schema in Markdown (MSON proposal) by tlarkworthy on Thursday April 10, 2014 @11:58AM (#7567283)
I write JSON schema in YAML, then js-yaml it to JSON. The source YAML looks remarkably similar to MSON
Re:Write JSON Schema in Markdown (MSON proposal) by Gobitron on Thursday April 10, 2014 @12:21PM (#7567497)
Slightly off-topic - any recommendations on the best javascript/node JSON Schema library?
Re:Write JSON Schema in Markdown (MSON proposal) by norswap on Thursday April 10, 2014 @11:47AM (#7567184)
We mostly need a replacement for JSON schema, which is not quite powerful enough.
Re:Write JSON Schema in Markdown (MSON proposal) by boronine on Thursday April 10, 2014 @12:03PM (#7567333)
What do you think about Teleport [0]? It is more like an actual type system (with dependent types!), with type signatures that get encoded in JSON. In Python (the only functioning implementation thus far), a real definition looks something like this [1].

Rather than providing a big fixed set of types, Teleport provides just the basics and allows you to define your own types, be it JSON-encoded primitives or fancy deeply nested structures.

Since my partner left to work on something else, work on Cosmic slowed down, but I'm successfully using Teleport at my day job and planning a new release soon, along with a complete JavaScript port.

[0] http://www.cosmic-api.com/docs/teleport/python/latest/

[1] https://github.com/cosmic-api/cosmic.py/blob/master/cosmic/t...

Re:Write JSON Schema in Markdown (MSON proposal) by tlarkworthy on Thursday April 10, 2014 @11:59AM (#7567290)
which spec are you working off? I am really interested in hearing what you think is not powerful enough. The meta-schema unioned all the types together. I find that annoying, but its drafted to be fixed in v5

anything else?

Re:Write JSON Schema in Markdown (MSON proposal) by KhalPanda on Thursday April 10, 2014 @11:41AM (#7567132)
Much benefit over coffeescript?
Re:Write JSON Schema in Markdown (MSON proposal) by luuio on Thursday April 10, 2014 @06:08PM (#7570025)
umm, yaml?