codex-team / codex-team/editor.js

Output format: Which properties (if any) can be null or omitted?

Open
#1,518 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

For a valid Editor.js document, can any of the top-level `time`, `blocks`, and `version` properties, or the block-level `type` and `data` properties, under any circumstances (now or in the future) be `null` or omitted? Or are they guaranteed to always be present and non-`null` for a document to be valid? Does whether `data` is null/present for a block depend on the block type?

Context: I'm a back-end .NET developer needing to parse Editor.js documents. [The docs on the output format](https://editorjs.io/saving-data#output-data-format) lists all of the aforementioned properties but does not explicitly guarantee that they will always be present and non-null. Back-end deserialization/parsing in strongly typed languages would be easier with some guarantees about which properties can and can not be null/omitted. (Ideally, any such guarantees should be added to the documentation to ensure they are formalized and kept in the future.)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.