In Ditto, you can export copy as a JSON directly in our web-app. In addition to being able to bring text from Ditto projects (and Figma files!) out in developer-friendly formats, the JSON exports in the web-app closely mirror the functionality of our API and can be used to preview what text in Ditto looks like via the API.
To learn more about exporting as a CSV, visit this guide.
To export text, click the Export icon in the top bar in either a project or your Component Library.
Our JSON exports support 4 primary formats:
Note that in order to access the Full, Flat, and Structured formats, you'll need to turn on Developer Mode for either the project or the Component Library. Additionally, any hidden text in the project will not be included.
Both the flat and structured formats are JSON formats that can be brought directly into most Translation Management Systems, such as Lokalise and Phrase. (See also the variant-specific export, below)
With each of these formats, if you select the "Only include text in blocks" checkbox, it will exclude text from the project that is not included in a block.
If Developer Mode is not turned on in a project, the JSON export of the project is formatted in the structure of the project itself (frames, blocks) without any IDs for strings.
The flat JSON format exports the strings from the project as a JSON object mapping text API IDs to the text itself.
The flat JSON format exports the strings from the project as a JSON object mapping text API IDs to objects containing the text item's metadata (text, status, notes, tags, and variants).
To export text from a single variant in your project or Component Library, use the Variant dropdown to choose from variants currently being used.
Variant-specific JSONs are also useful for localizing your text by separating them into language-specific files.