Importing diagrams

Drop JSON, Mermaid or zip files on a project, and each file becomes a new diagram in it.

  • Drop files on a project in the list. Its rows get a dashed outline, and you can drop several files at once.
  • ⋯ → Import diagram… on a project picks a single file.

Accepted files#

FileBecomes
.json with nodes and arrowsA diagram with one page, "Page 1".
.json with a pages listA diagram with those pages, names and order.
.mmd, .mermaid, or any file that starts like MermaidA diagram with one laid-out page, named after the diagram's title. See Mermaid diagrams.
.zipOne diagram with a page per .json, .mmd and .mermaid file in it.

Diagrams are named after their file without the extension: orders-api.json becomes "orders-api". The JSON is Lineout's diagram format:

{
  "pages": [
    { "name": "Request flow", "nodes": [], "arrows": [] },
    { "name": "Network", "nodes": [], "arrows": [] }
  ]
}

nodes and arrows are required even when empty, and pages needs at least one page.

Zip files#

  • Pages come in the order the zip lists the files, named after their file. A document with pages adds all its pages.
  • A multi-page JSON export (.zip) imports back as one diagram with the same pages.
  • Files in folders are read. Other files, hidden files, __MACOSX/ and nested zips are skipped.
  • The zip is unpacked in your browser, and only the resulting diagram is uploaded.
One invalid file in a zip fails the whole zip.

Limits#

LimitValue
File size, JSON, Mermaid or zip10 MB
Diagram size, all pages1 MB
Files in a zip100, up to 10 MB unpacked

In a personal team on the Free plan, every imported file counts toward the diagram limit, a zip as one diagram, and each diagram toward the shape limit. When the team doesn't have room for all the valid files of an import, none of them is imported. See Plans and limits.

Image nodes carry only their image's id. Lineout copies in the images of diagrams you can open, and those copies count toward the team's image storage. The others show a placeholder. See Adding images.

Errors#

Lineout validates each file before creating anything. Import failed lists every file that failed with its first problem, and the other files are imported:

orders-api.json: arrows[0].end.nodeId "db" does not match any node
checkout.mmd: line 4: missing ] to close the label
Checkout.zip: Network.json: nodes must be an array
MessageMeaning
file is larger than …Over the file size limit. Nothing in it was read.
diagram is larger than …Over the diagram size limit. Split its pages into smaller diagrams.
not a zip file Lineout can readDamaged, encrypted or using compression Lineout can't unpack.
zip holds no JSON or Mermaid filesNothing to import outside hidden files and folders.
zip holds more than …, zip unpacks to more than …Over the zip limits.
couldn't be importedThe file was valid but saving failed. Try again.