28 January 2014

I work with APIs a lot. I appreciate the effort some groups put forth to document their API and their payload formats, especially when tools like Swagger can help demonstrate the API in the browser.

While looking at one of the d3.js examples, I wondered if I could improve the visualization of a typical JSON schema. I gisted my first pass and if anyone else finds this useful or wants to extend it, we can make it a repo.

The node script below should create a file to replace flare.json from the d3 example. You’ll need to install traverse first: npm install traverse (which I really like, btw).

sample image

Example:

node traverse-schema.js my_schema_file.json



Discussion:

blog comments powered by Disqus