Once Delphi.Forms.Visitor (#41) ships, evaluate migrating the JSON
serialization in Delphi.Forms.JSON to use the visitor for traversal.
This migration is less straightforward than NormalizeForm or Statistics
because JSON serialization builds a nested TJSONObject tree that mirrors
the AST hierarchy -- the visitor's flat callback model does not naturally
produce nested output. A stack-based approach in the visitor (push/pop
JSON objects on enter/leave) can work but adds complexity.
Scope
Acceptance criteria
Once
Delphi.Forms.Visitor(#41) ships, evaluate migrating the JSONserialization in
Delphi.Forms.JSONto use the visitor for traversal.This migration is less straightforward than NormalizeForm or Statistics
because JSON serialization builds a nested
TJSONObjecttree that mirrorsthe AST hierarchy -- the visitor's flat callback model does not naturally
produce nested output. A stack-based approach in the visitor (push/pop
JSON objects on enter/leave) can work but adds complexity.
Scope
JSON serialization code
TJsonVisitorwith a JSON object stackFormFileToJSONandFormObjectToJSONpublic API unchangedAcceptance criteria