Skip to content

Handles google.protobuf.Value fields by delegating to a StringHandler#65

Closed
rajuGT wants to merge 1 commit intomainfrom
google-protobuf-value-handler
Closed

Handles google.protobuf.Value fields by delegating to a StringHandler#65
rajuGT wants to merge 1 commit intomainfrom
google-protobuf-value-handler

Conversation

@rajuGT
Copy link
Copy Markdown

@rajuGT rajuGT commented Nov 3, 2025

This handler treats Value as a plain string:

  • Converts between String and Value
  • Ignores nested structures (STRUCT_VALUE, LIST_VALUE)
  • Useful as a lightweight workaround to recursion in google.protobuf.Value

 * There are two concerns with google.protobuf.Value type
 * 1. It has cyclic reference - https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/struct.proto#L94
 * 2. oneof usage; i.e. It has no specific type information, every message can be of different type
 *  - https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/struct.proto#L64
 *
 * <p>This handler treats {@link Value} as a plain string:
 * - Converts between String and Value
 * - Ignores nested structures (STRUCT_VALUE, LIST_VALUE)
 * - Useful as a lightweight workaround to recursion in google.protobuf.Value
@rajuGT
Copy link
Copy Markdown
Author

rajuGT commented Jan 28, 2026

#67

@rajuGT rajuGT closed this Jan 28, 2026
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