- 2022: The .canvas open format was created for Obsidian Canvas [0].
- 2024: Official 1.0 spec of JSON Canvas [1].
- 2024-2025: A number of apps/libraries built up around conversion, storage, and import/export [2].
- 2026: Obsidian Skills [3] includes support for .canvas (along with .md and .base) to make it easy for LLMs to read/write JSON Canvas, and opens interesting visualization/interaction patterns with agents.
[0]: https://news.ycombinator.com/item?id=34066824
[1]: https://news.ycombinator.com/item?id=39670922
Although you can go to https://jsoncanvas.org/ itself and see an example rendering, you cannot see the exact data that created it - I think, although you can sort of guess since the element names are stuff like node.
I sort of doubt this is the best data structure for representing this kind of thing. Maybe I'm wrong though but I would think I would go for something like https://github.com/jsongraph/json-graph-specification which strikes me as closer to graphml which I have some experience with, and maybe give it ability to embed videos etc. (which for all I know someone already has)
This is all an initial feeling though, like hmm, no I think it's wrong, and maybe I am just not seeing why this would be better than another solution.
This just looks like a pretty normal homepage. It was not obvious to me at all that the homepage was an actual dynamically rendered canvas, as opposed to just canvas-"themed".
See also the original inspiration for the format: https://obsidian.md/canvas
JSON Canvas nails the simplicity-it's easy to read and easy to implement. We wanted to build on that spirit while tackling some of the challenges showing up in this thread: nested canvases, extensibility for custom app data, text styling, coordinate systems, and round-tripping between different canvas apps without data loss.
OCIF v0.7.0 just came out. It's designed to be an interchange format — so different canvas tools (Excalidraw, TLDraw, Obsidian, etc.) can export/import each other's canvases.
Some highlights:
- Extensible: apps can attach their own data via extensions, so nothing gets lost even if the features aren't supported
- Nested canvases via parent-child node relationships
- Local coordinate systems (addresses the pixel positioning concerns raised in another comment here)
- Text styling, viewport control, and more via built-in extensions
If JSON Canvas isn't quite meeting your needs, OCIF[1] might be worth a look.
JSON Canvas:
graph primitive
easier to read, write, and reason about
harder to render
SVG: path primitive
easier to render
harder to read, write, and reason aboutI still don't see your point. Why wouldn't I always choose SVG? What problem or pain point is being solved?
https://codepen.io/ItIsHappy/pen/vEXrXxg
Yes, I'm being pedantic, but that was the point of my comment. SVGs aren't interactive by default, you need to bring your own interactivity.
For static content, SVGs work great, but for interactive content the additional sematic layer of JSON Canvas has a clear benefit. SVGs represent connections using paths, while JSON Canvas uses a graph. This means SVG cannot connect a single node to more than 2 adjacent nodes. If I want to draw arrows from Alice, Bob, and Charlie all to Dave, then I need to create a second Dave or reference to that location somehow. (You can see this in your sword example by moving one of the edge points. The sword delaminates because only two of the four edges at that point can be connected together.) SVG provides limited tooling for this, but it gets rather complicated rather quickly.
An "infinite" canvas without some notion of recursion such as viewports feels incomplete.
Obsidian's implementation of JSON Canvas supports this.
It is a great VSCode extension as-is, but the maintainers have abandoned it and they keep refusing to make it open-source. Someone is bound to make an open-source copy soon.
Still the best option though!
The upside is that it does not leave the most important aspect open to interpretation.
But it prevents this from being text-only at the point of creation:
You'll most likely need some programmatic environment to create non-trivial diagrams.
But then the question is: Why not just an SVG instead?