Skip to content

Add Export/Import Automata as JSON Feature #5

@Z-xus

Description

@Z-xus

Environment:

  • React + TypeScript
  • PNPM-managed project
  • DFA visualization and editor component

Description:
Currently, there is no way to persist or transfer DFA configurations. Users should be able to export the automata as a JSON file and import it back into the app to continue editing or share with others.

Expected Behavior:

  • Users can export the current DFA/automata as a JSON file.
  • Users can import a previously exported JSON file to restore the DFA.
  • Imported DFAs should render correctly in the graph editor with all states, transitions, and labels intact.

Acceptance Criteria:

  • Export button downloads a valid JSON representation of the DFA.
  • Import button accepts a JSON file and correctly recreates the DFA.
  • Validation prevents importing invalid or malformed JSON.

Additional Notes:

  • JSON format should include states, transitions, start and accept states.
  • Consider using TypeScript types/interfaces for DFA structure to ensure type safety.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions