ARTEMIS-6219 Support _class discriminator in JSON/YAML broker properties - #6658
Merged
Conversation
gtully
approved these changes
Sep 1, 2026
gtully
left a comment
Contributor
There was a problem hiding this comment.
that is a nice solution to the problem.
Contributor
|
the properties have a conversion method to go from String to a class type and have the order dependency to have the special string value first. |
lavocatt
force-pushed
the
fixjsonloader
branch
from
September 1, 2026 14:10
61ffdcd to
124bf3e
Compare
lavocatt
force-pushed
the
fixjsonloader
branch
from
September 1, 2026 16:09
124bf3e to
0cfa27f
Compare
Add reserved _class key support for interface-typed fields in JSON/YAML broker properties. The class name was already exposed by the flat format (e.g. storeConfiguration=org...DatabaseStorageConfiguration.class); this makes the same mechanism available in structured formats where a JSON key cannot simultaneously be a scalar discriminator and an object container. Assisted-by: Claude Opus 4.6
lavocatt
force-pushed
the
fixjsonloader
branch
from
September 1, 2026 16:09
0cfa27f to
077abf3
Compare
Contributor
Author
The _class value is now emitted as-is, an users choose to use the fully qualified class name or the short name if possible |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
JSON and YAML broker properties cannot configure interface-typed fields like storeConfiguration and HAPolicyConfiguration because hierarchical formats cannot express a key as both a scalar discriminator and an object with sub-properties simultaneously.
Introduce a reserved _class key that emits the FQCN as a .class property before processing sub-properties, leveraging the existing ClassloadingUtil instantiation path. The _class key is extracted before iterating entries, making it order-independent regardless of JSON key serialization order.
Assisted-by: Claude Opus 4.6 noreply@anthropic.com