Java ProtoJSON extensions: verify the approved qualified key
Separate an extension’s full identity from its short name.
Full identity beyond a short name
Separate an extension’s full identity from its short name. Approve the qualified JSON key understood by the consumer before publishing output. Retain raw JSON keys and duplicates before preparing Truthound tables; a normal map parse may already have discarded a collision. [1, 2, 3]
The difference between an option and a default
Protobuf #27499 describes Java JSON serialization using short extension names and an opt-in printingFullyQualifiedExtensionNames() option in 35.0. Changing the default is a breaking change. Availability of that option does not mean it is enabled automatically in every installation. [1]
Preserve raw keys first
Use two extensions sharing a short name to compare raw JSON keys and consumer parsing. Withhold output that loses full identity. Fix the extension registry and serializer version, retain raw keys before ordinary map conversion and test actual consumer parsing separately. [1, 3]
The approved [foo.bar] representation
The illustrative extension is foo.bar and its approved ProtoJSON key is [foo.bar]. That representation passes; bar fails because it can collide with an ordinary field or another extension. A correct individual key does not validate the entire message or establish the absence of duplicate keys. [1, 3]
Check a per-extension table
Truthound Core Python SDK 3.3.2 can compare prepared required_extension_key and serialized_extension_key through ColumnPairValidator with relationship="==". The operator extracts non-missing per-extension keys from raw JSON. The SDK does not change serializer defaults or registries, or replace full consumer parsing. [1, 2, 3]
The consumer cost of a key change
Enable printingFullyQualifiedExtensionNames() explicitly on a supported version and cross-parse with the consumer. Messages without extensions do not have this collision path. Plan migration for clients depending on the keys rather than expecting a silent default change. [1, 3]
Application conditions
Confirm extension registry and serializer version, checking raw duplicate keys before ordinary map parsing.
Alternatives
Enable printingFullyQualifiedExtensionNames() explicitly and cross-test the actual consumer.
Limitations
The SDK does not change Java defaults or registries; one correct key does not prove whole-message parsing.
Evidence
- Event checked
- Subject checked
- Modified
