Skip to content

Json realignment#55

Merged
akollegger merged 2 commits intomainfrom
json-realignment
Jan 29, 2026
Merged

Json realignment#55
akollegger merged 2 commits intomainfrom
json-realignment

Conversation

@akollegger
Copy link
Contributor

This pull request standardizes the canonical JSON format for the "Subject" object by renaming the field "symbol" to "identity" across all documentation, schemas, type definitions, and code samples. This ensures consistency between implementations (gram-hs, gram-rs, and related tooling) and aligns all references with the correct, canonical structure.

Canonical JSON alignment and documentation:

  • Updated all documentation files (including data-model.md, quickstart.md, and CANONICAL-JSON-ALIGNMENT.md) to use "identity" instead of "symbol" for the Subject identifier, with updated examples, attribute lists, and Haskell/Rust/TypeScript mappings. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]

Schema and type definition updates:

  • Changed the JSON Schema (json-schema.json) to require "identity" instead of "symbol" for the Subject object and updated the field description.
  • Updated Rust struct (rust-types.rs) and TypeScript interface (typescript-types.ts) definitions to use identity as the Subject identifier, with corresponding field documentation and test updates. [1] [2] [3]

Implementation notes and alignment status:

  • Clarified in the alignment documentation that both gram-hs and gram-rs now use "identity", and marked the field as already correct, requiring no further changes. Updated the status of the alignment process and provided additional notes for future development. [1] [2]

Research and parsing logic:

  • Updated the Haskell parsing logic in research.md to expect "identity" instead of "symbol" in JSON decoding.

These changes collectively ensure that all documentation, code, and tooling reference the correct canonical field name, reducing confusion and potential integration errors across the project.

…symbol'

- Updated JSON Schema to use 'identity' field for Subject
- Updated TypeScript types to use 'identity' field
- Updated Rust types and tests to use 'identity' field
- Updated all documentation examples in spec files
- Updated CANONICAL-JSON-ALIGNMENT.md to reflect current state

The Haskell implementation already used 'identity' correctly.
This change synchronizes the contracts (schema, types, docs) with
the actual implementation.

Rationale: Field name should reflect semantic meaning (identity)
rather than implementation type (Symbol).

All tests pass: 249 examples, 0 failures.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request standardizes the canonical JSON format for the Subject object by renaming the field "symbol" to "identity" across all documentation, schemas, type definitions, and code samples. This aligns the specification and contract files with the actual Haskell implementation, which already uses "identity", and ensures consistency across implementations (gram-hs, gram-rs, and related tooling).

Changes:

  • Updated JSON Schema to require "identity" instead of "symbol" for the Subject object with corresponding field description updates
  • Updated TypeScript and Rust type definitions, documentation, and test code to use identity as the Subject identifier field
  • Updated all documentation files with corrected JSON examples, Haskell/Rust/TypeScript mappings, and attribute lists
  • Updated alignment documentation to reflect that both gram-hs and gram-rs now correctly use "identity", marking this field as already aligned

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
specs/029-canonical-json-pattern/research.md Updated Haskell JSON parsing logic to expect "identity" field
specs/029-canonical-json-pattern/quickstart.md Updated JSON examples in CLI output and programming language samples
specs/029-canonical-json-pattern/data-model.md Updated data model documentation, field descriptions, validation rules, and all JSON examples
specs/029-canonical-json-pattern/contracts/typescript-types.ts Updated TypeScript interface definition and field documentation
specs/029-canonical-json-pattern/contracts/rust-types.rs Updated Rust struct definition, field documentation, and test assertions
specs/029-canonical-json-pattern/contracts/json-schema.json Updated JSON Schema required fields and property definitions
docs/reference/CANONICAL-JSON-ALIGNMENT.md Updated alignment status to show both implementations now use "identity" with explanatory notes

@akollegger akollegger merged commit 97403ea into main Jan 29, 2026
7 checks passed
@akollegger akollegger deleted the json-realignment branch January 29, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant