Implement stable versioned JSON serialization for validated IR #8

Closed
opened 2026-06-06 14:02:49 +02:00 by yorunikakeru · 0 comments
Owner

Parent: #6

Goal

Serialize validated IR into the stable JSON contract documented in README.

Tasks

  • Add explicit root version.
  • Define manual JSON encoders for document, areas, domain nodes, and observation strategies.
  • Keep field names and discriminator values stable and intentional.
  • Expose serialization only for validated IR.
  • Add golden fixtures for README examples.

Acceptance criteria

  • README examples encode exactly to reviewed golden JSON.
  • Same IR produces deterministic output.
  • Adding a node requires an explicit encoding case.
  • Unsupported or unknown node tags are treated as version incompatibility by consumers, not silently ignored.
Parent: #6 ## Goal Serialize validated IR into the stable JSON contract documented in README. ## Tasks - Add explicit root `version`. - Define manual JSON encoders for document, areas, domain nodes, and observation strategies. - Keep field names and discriminator values stable and intentional. - Expose serialization only for validated `IR`. - Add golden fixtures for README examples. ## Acceptance criteria - README examples encode exactly to reviewed golden JSON. - Same IR produces deterministic output. - Adding a node requires an explicit encoding case. - Unsupported or unknown node tags are treated as version incompatibility by consumers, not silently ignored.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
FrogOS/DSL#8
No description provided.