-
Notifications
You must be signed in to change notification settings - Fork 2.2k
docs: Added adr template and protojson adr #1214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+190
−0
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
bb8a41e
Added adr template and protojson adr
darrelmiller 689c9c7
docs: Update ADR-001 to include additional considerations regarding P…
darrelmiller 7fd9cd7
Update adrs/adr-001-protojson-serialization.md
darrelmiller 9668054
Update adrs/adr-template.md
darrelmiller 6ace34a
Update adrs/adr-001-protojson-serialization.md
darrelmiller 84dac80
Added some more consequences
darrelmiller c9c4acf
Merge branch 'main' into adr-protojson
darrelmiller f235b95
Fixed markdown linting errors
darrelmiller 914fd9b
Merge branch 'main' into adr-protojson
muscariello f4ab242
Merge branch 'main' into adr-protojson
muscariello 9e250e5
Merge branch 'main' into adr-protojson
darrelmiller e0e376b
fix(spelling): Add 'adr', 'adrs', and 'ADR' to allowed terms in spell…
darrelmiller 477a092
resorted allow.txt
darrelmiller 1fc1a7e
fix(spelling): Add 'protojson' to allowed terms in spelling check
darrelmiller 829ab16
Merge branch 'main' into adr-protojson
darrelmiller d8c1fb7
Merge branch 'main' into adr-protojson
darrelmiller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # ADR-001: Leverage ProtoJSON Specification for JSON Serialization | ||
|
|
||
| **Status:** Accepted | ||
|
|
||
| **Date:** 2025-11-18 | ||
|
|
||
| **Decision Makers:** Technical Steering Committee (TSC) | ||
|
|
||
| **Technical Story:** JSON serialization approach for A2A specification | ||
|
|
||
| ## Context | ||
|
|
||
| The A2A specification defines message structures using Protocol Buffers (proto definitions) but also needs to support JSON serialization for HTTP/REST-based communication and JSONRPC payloads. We needed to establish a normative approach for how JSON payloads should be serialized based on the proto definitions referenced by the specification. | ||
|
|
||
| Without a clearly specified approach to JSON serialization from proto definitions, implementers could create incompatible JSON representations, leading to interoperability issues across different A2A implementations. | ||
|
|
||
| ## Decision Drivers | ||
|
|
||
| * Need for a standardized, well-documented approach to JSON serialization | ||
| * Ability to leverage existing Protocol Buffer tooling | ||
| * Clear specification for handling edge cases and type mappings | ||
| * Idiomatic use of JSON conventions | ||
| * Coupling of specification to tool chain | ||
|
|
||
| ## Considered Options | ||
|
|
||
| * ProtoJSON (canonical JSON encoding for Protocol Buffers) | ||
| * Explicit transformation rules defined in the A2A specification | ||
|
|
||
| ## Decision Outcome | ||
|
|
||
| **Chosen option:** "ProtoJSON specification" | ||
|
|
||
| The TSC has decided to leverage the ProtoJSON specification as the normative approach to serializing JSON based on the proto definition referenced by the specification. This provides a well-defined, standardized way to convert Protocol Buffer messages to JSON format. | ||
|
|
||
| This decision was made with some reservation due to the dependency on ProtoJSON mechanisms and potential impact on protocol bindings unrelated to protobuf and gRPC. However, the decision is reversible if we identify significant issues during implementation, at which point we can duplicate the ProtoJSON conventions in the A2A specification where applicable and describe differences as needed. | ||
|
|
||
| ### Consequences | ||
|
|
||
| #### Positive | ||
|
|
||
| * Standardized approach with clear documentation and specification | ||
| * Wide ecosystem support with mature libraries across multiple languages | ||
| * Consistent behavior across different implementations | ||
| * Reduced ambiguity in JSON representation | ||
| * Built-in handling for proto3 types and conventions | ||
| * Provides well-defined rules for wire-unsafe changes | ||
| * Removes the need to define data type handling rules for dates and numbers in the A2A specification | ||
|
|
||
| #### Negative | ||
|
|
||
| * **Breaking change**: This decision will result in breaking changes to existing JSON payloads, specifically relating to the casing of enum values (ProtoJSON uses SCREAMING_SNAKE_CASE for enums) | ||
| * **Loss of roundtrip capability**: We will not be able to roundtrip unknown values because ProtoJSON doesn't support preserving unknown fields in the JSON representation | ||
| * Migration effort required for existing implementations | ||
| * **Ugly enums** Developers are not used to seeing enum values in SCREAMING_SNAKE_CASE in JSON, which may lead to confusion or errors during implementation | ||
| * Changes to the ProtoJSON specification for the benefit of gRPC could have an impact on other protocol bindings. | ||
| * Enums require a "unspecified" value even when they are only used for required fields to meet Proto best practices. | ||
| * Certain field names need to have less than optimal names to avoid conflicts with proto keywords. e.g. message. | ||
|
|
||
| #### Neutral | ||
|
|
||
| * Implementations must follow ProtoJSON specification strictly | ||
| * Documentation must clearly communicate the breaking changes | ||
|
|
||
| ## References | ||
|
|
||
| * [ProtoJSON format](https://protobuf.dev/programming-guides/json/) | ||
|
|
||
| ## Notes | ||
|
|
||
| This decision was made to ensure long-term interoperability and maintainability of the A2A specification. While it introduces breaking changes in the short term, the benefits of standardization and ecosystem alignment outweigh the migration costs. | ||
|
|
||
| Implementers should be aware that the enum casing change is the most visible breaking change and should plan accordingly for version transitions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| # ADR-[number]: [Title] | ||
|
|
||
| **Status:** [Proposed | Accepted | Deprecated | Superseded] | ||
|
|
||
| **Date:** YYYY-MM-DD | ||
|
|
||
| **Decision Makers:** [List of people involved in the decision] | ||
|
|
||
| **Technical Story:** [Optional: Link to related issue/story] | ||
|
|
||
| ## Context | ||
|
|
||
| [Describe the context and problem statement. What is the issue that we're seeing that is motivating this decision or change?] | ||
|
|
||
| ## Decision Drivers | ||
|
|
||
| * [Driver 1: e.g., performance requirements] | ||
| * [Driver 2: e.g., maintainability concerns] | ||
| * [Driver 3: e.g., team expertise] | ||
| * [Driver 4: e.g., cost considerations] | ||
|
|
||
| ## Considered Options | ||
|
|
||
| * [Option 1] | ||
| * [Option 2] | ||
| * [Option 3] | ||
|
|
||
| ## Decision Outcome | ||
|
|
||
| **Chosen option:** "[Option X]" | ||
|
|
||
| [Describe why this option was selected. What are the expected positive outcomes?] | ||
|
|
||
| ### Consequences | ||
|
|
||
| #### Positive | ||
|
|
||
| * [Positive consequence 1] | ||
| * [Positive consequence 2] | ||
|
|
||
| #### Negative | ||
|
|
||
| * [Negative consequence 1] | ||
| * [Negative consequence 2] | ||
|
|
||
| #### Neutral | ||
|
|
||
| * [Neutral consequence 1] | ||
|
|
||
| ## [Optional] Pros and Cons of the Options | ||
|
|
||
| ### [Option 1] | ||
|
|
||
| [Brief description of option 1] | ||
|
|
||
| **Pros:** | ||
|
|
||
| * [Advantage 1] | ||
| * [Advantage 2] | ||
|
|
||
| **Cons:** | ||
|
|
||
| * [Disadvantage 1] | ||
| * [Disadvantage 2] | ||
|
|
||
| ### [Option 2] | ||
|
|
||
| [Brief description of option 2] | ||
|
|
||
| **Pros:** | ||
|
|
||
| * [Advantage 1] | ||
| * [Advantage 2] | ||
| * [Advantage 2] | ||
|
|
||
| **Cons:** | ||
|
|
||
| * [Disadvantage 1] | ||
| * [Disadvantage 2] | ||
|
|
||
| ### [Option 3] | ||
|
|
||
| [Brief description of option 3] | ||
|
|
||
| **Pros:** | ||
|
|
||
| * [Advantage 1] | ||
| * [Advantage 2] | ||
| * [Advantage 2] | ||
|
|
||
| **Cons:** | ||
|
|
||
| * [Disadvantage 1] | ||
| * [Disadvantage 2] | ||
|
|
||
| ## Implementation | ||
|
|
||
| [Optional: Describe the implementation plan, timeline, and any specific technical details] | ||
|
|
||
| ## Related Decisions | ||
|
|
||
| * [Link to related ADR 1] | ||
| * [Link to related ADR 2] | ||
|
|
||
| ## References | ||
|
|
||
| * [Link to resource 1] | ||
| * [Link to resource 2] | ||
| * [Link to resource 3] | ||
|
|
||
| ## Notes | ||
|
|
||
| [Any additional notes, follow-up items, or context that doesn't fit elsewhere] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.