Live data from Hacker News

JSON Canvas – An open file format for infinite canvas data

jsoncanvas.org

111–120 of 168 posts

Re: JSON Canvas – An open file format for infinite canvas data

#111
Exploring the concept of files > app deeper, it would be interesting if we were able to foster a culture of website apps writing to local storage with files (in a similar manner to Obsidian), and if we had a common format for doing so, with an open-source daemon that sync'd writes to and from that directory to e.g. some other folder. That would unlock ownership of data even in web apps. The daemon could be app-agnostic and just dutifully sync all the things.

Re: JSON Canvas – An open file format for infinite canvas data

#112
post #83

Earlier quoted context omitted.

Yeah, didn't see any discussion in the other thread, do you have any notes on why this isn't SVG?

SVG is great and you are the first person I have ever seen who would (and did) imply that SVG might be or would be better than JSON for this kind of thing. SVG really stretches the “human readable” thing to its limit, and I personally would not adopt an SVG-like format for anything that isn’t SVG.

[dead]

Re: JSON Canvas – An open file format for infinite canvas data

#113
Why make so many fields required?

Node: only id, x, y would be necessary. This would allow for point nodes. We could even imagine letting go of x and y to signify that the position of the node is not fixed and could be recomputed in real time by the program.

Even ids could be optional, why require them if they are not referenced?

An added bonus of having point nodes is that you get freehand drawings for free: every stroke is a series of connected dots. Maybe it is an anti-feature though, depending on your vision.

Re: JSON Canvas – An open file format for infinite canvas data

#114
post #83

Earlier quoted context omitted.

Yeah, didn't see any discussion in the other thread, do you have any notes on why this isn't SVG?

SVG is great and you are the first person I have ever seen who would (and did) imply that SVG might be or would be better than JSON for this kind of thing. SVG really stretches the “human readable” thing to its limit, and I personally would not adopt an SVG-like format for anything that isn’t SVG.

Looking at the samples, this isn't human readable either (long opaque id strings for linking dominate the syntax) and both syntaxes have vast amounts of punctuation and whitespace. And neither of them are particularly human writable. But something svg-based would have lots of existing options for additional processing in consistent ways, that would be ad-hoc for a json-based syntax.

(Given that this is coming from obsidian, I kind of expected something actually markdown-like - which would certainly be a challenge, but not an impossible one.)

Granted, this notation is a little higher level than SVG, so the model mismatch might be a bigger problem anyway?

Re: JSON Canvas – An open file format for infinite canvas data

#115
post #95
post #83

Earlier quoted context omitted.

Yeah, didn't see any discussion in the other thread, do you have any notes on why this isn't SVG?

It makes sense if you see Obsidian as the starting point - it's a document store. While other canvas products may be more graphics-oriented, Obsidian's is about laying out documents and objects and providing simple relationships between them. For this purpose, JSON's probably a lot easier to work with than XML/SVG.

Obsidian's own file format might have merit, but posting it as an "open file format", "created to provide (...) interoperability, and extensibility to data created with infinite canvas apps"... and then publishing 1.0 without consulting with anybody else... is rather egregious, I think.

I agree with you that posting Obsidian's spec to start the conversation would have been welcome, but this is not what they did.

Re: JSON Canvas – An open file format for infinite canvas data

#116
post #115
post #95

Earlier quoted context omitted.

It makes sense if you see Obsidian as the starting point - it's a document store. While other canvas products may be more graphics-oriented, Obsidian's is about laying out documents and objects and providing simple relationships between them. For this purpose, JSON's probably a lot easier to work with than XML/SVG.

Obsidian's own file format might have merit, but posting it as an "open file format", "created to provide (...) interoperability, and extensibility to data created with infinite canvas apps"... and then publishing 1.0 without consulting with anybody else... is rather egregious, I think. I agree with you that posting Obsidian's spec to start the conversation would have been welcome, but this is not what they did.

I'm not sure I agree with you here at all. They can start a format that serves their own purpose, and make it open for interoperability and extensibility sake. Nothing wrong with it.

Re: JSON Canvas – An open file format for infinite canvas data

#117
post #69

Obsidian is one of the few closed-source applications I would consider relying on, due to their commitment to building around simple, open file formats. Sure, they could screw me over and start charging absurd amounts of money for their app, but high quality open source alternatives would pop up immediately. Meanwhile, as long as they don't screw me over, it's unlikely an open source alternative is going to be able t…

The big gap I would love to be solved is a, preferably selfhosted, browser based view into my notes. That way I could access my notes from computers you can't or won't install obsidian on. If it was open source that would be more likely to happen

Do you mean how your notes are connected, and organized? Otherwise, they are plain-text Markdown files. Any app that renders Markdown should be able to do it.

In-fact, I don’t really like Obsidian on Mobile, so I use iA-Writer to edit/view the Markdown files that I managed with Obsidian on the Desktop.

Re: JSON Canvas – An open file format for infinite canvas data

#118

Earlier quoted context omitted.

Exactly so. SQLite also has a rich collection of CHECK constraints which can raise errors if data is not to your liking in some fashion, this includes validating JSON. Not a JSON schema, admittedly, although (just like for Postgres) this is available as an extension. https://github.com/asg017/sqlite-jsonschema Saying that SQLite doesn't have "real types" is simply false. If one doesn't want to learn how to use a tool…

The author of SQLite is quite open about it. The lack of typing has been part of the design from the beginning. Sqlite has hardly any types: INT INTEGER REAL TEXT BLOB ANY Of course one can program all kind of check constraints, like one can program all kinds of value validations in javascript. Unfortunately, that is not the same as typing. Sqlite lacks typing because, as the sqlite author explains in the docs, flexi…

Aren't these the types?

  NULL
  INT(EGER)
  REAL
  TEXT
  BLOB
  (INTEGER PRIMARY KEY)

Re: JSON Canvas – An open file format for infinite canvas data

#119
post #115
post #95

Earlier quoted context omitted.

It makes sense if you see Obsidian as the starting point - it's a document store. While other canvas products may be more graphics-oriented, Obsidian's is about laying out documents and objects and providing simple relationships between them. For this purpose, JSON's probably a lot easier to work with than XML/SVG.

Obsidian's own file format might have merit, but posting it as an "open file format", "created to provide (...) interoperability, and extensibility to data created with infinite canvas apps"... and then publishing 1.0 without consulting with anybody else... is rather egregious, I think. I agree with you that posting Obsidian's spec to start the conversation would have been welcome, but this is not what they did.

Obsidian's philosophy is file over app [1] and releasing a spec for their Canvas feature is fulfilling that promise. It's a strictly positive 'today is better than yesterday' thing for them to have done so.

You shouldn't need to ask permission or consult anyone to do this. That's a silly bar, 'egregious' even. When markdown was created, Gruber wasn't asking all his friends making text editors whether they'd support it. He just released it, and others chose to adopt it on its merits.

I don't meant this to sound harsh, but just to call it as I see it - your comment is basically creating a 'damned if you do, damned if you don't' scenario and an example of why people building things shouldn't worry much about comments in forums.

[1]: https://stephango.com/file-over-app

Re: JSON Canvas – An open file format for infinite canvas data

#120
post #50

This is a great idea. For now though, the spec is under-specified and ambiguously terse. A few points that could be clarified: - How do coordinates work? Does +Y point up (OpenGL) or down (web)? Is the origin meaningful? What are the units - how does this interact with font sizes? High-DPI displays? - What’s the difference between a file node and a URL node linking to file://./? Are files supposed to be transcluded?…

> Is the origin meaningful? I assume no. > What are the units Arbitrary. The website says pixels, but the demo lets you zoom in and out, so I think defining the unit as pixels is pretty meaningless, except as a hint to the viewer of the initial scale for the canvas. Even then I can see good reasons for a viewer program to just ignore that and use whatever initial scale allows everything to fit on screen. > how does t…

I know this isn’t intended as a document presentation format, but for a consistent layout, it would be a good idea to specify the ratio between pixels (for layout) and font size (in pt). Otherwise, viewers would render text inconsistently-each node would be some ratio too big or too small for its contents.
Post reply on HN