\

JSON Canvas Spec

46 points - last Monday at 9:38 AM

Source
  • kepano

    today at 8:09 PM

    I'm not sure why it popped up today, but it's nice to see it on HN again! A brief timeline with some links to past discussions:

    - 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

    [2]: https://jsoncanvas.org/docs/apps/

    [3]: https://github.com/kepano/obsidian-skills

    • bryanrasmussen

      today at 6:35 PM

      It would be useful to have examples of data and the representation this would result in.

      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.

        • kepano

          today at 6:50 PM

          You can see the data it created. Just click "Toggle output" in the bottom right corner.

            • crazygringo

              today at 8:05 PM

              Oh, thanks. Those buttons seem designed to be as inconspicuous as possible.

              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".

              • bryanrasmussen

                today at 7:28 PM

                ah ok, sorry about that. I didn't really look at that part of the UI much, noticed it had some zoom stuff, noticed I couldn't zoom normally and scroll to where I wanted to read, was somewhat miffed.

        • today at 7:46 PM

          • whycombinetor

            today at 7:50 PM

            Previously posted in 2022 as Obsidian Canvas before being open sourced in 2024 https://news.ycombinator.com/item?id=34066824

            • obsidianbases1

              today at 7:47 PM

              I've used canvas quite a bit since it was release in Obsidian. It's good, not great, but the simplicity of the file type opens up a lot of opportunities to build on top of it.

                • big_toast

                  today at 8:07 PM

                  It took me a while to start using canvases. But now I think they should be a much more common UI pattern. They really shine on large (40"+ non-retina 4k) screens. The simplicity at launch made me feel more confident in using them at all. I don't use most of the other obsidian features/plugins.

              • Garlef

                today at 7:36 PM

                I'm not sure about this:

                An "infinite" canvas without some notion of recursion such as viewports feels incomplete.

                  • kepano

                    today at 7:54 PM

                    A file node can be a .canvas, so a .canvas can have nested canvases.

                    Obsidian's implementation of JSON Canvas supports this.

                • makeitrain

                  today at 6:28 PM

                  Looks cool. I recently hit some limits with mermaid and this seems a little more flexible.

                  • MoonWalk

                    today at 6:53 PM

                    Are pixels really the best way to encode position at this point?

                      • Garlef

                        today at 7:24 PM

                        Agreed.

                        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?

                        • 9wzYQbTYsAIc

                          today at 7:54 PM

                          I’m playing with 3d positions derived from higher dimensions, right now.