Skip to content
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

Wrong JSON representation of empty complex <Annotation> #75

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

HeikoTheissen
Copy link
Contributor

No description provided.

@HeikoTheissen HeikoTheissen marked this pull request as draft December 16, 2022 12:48
<Term Name="bar" Type="foo.record"/>
<ComplexType Name="record">
<Annotation Term="foo.bar" Qualifier="WithRecord">
<Record/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Omitting this empty <Record> should make no difference.

Comment on lines +11 to +12
"@foo.bar#WithRecord": {},
"@foo.bar#WithoutRecord": true
Copy link
Contributor Author

@HeikoTheissen HeikoTheissen Dec 16, 2022

Choose a reason for hiding this comment

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

The default annotation value in JSON depends on whether a <Record> was present in XML.

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct. We use Boolean tagging annotations (typically with Type="Core.Tag" DefaultValue="true") a lot, and the code is optimized for this.

This can only be improved if the term definition is read from the referenced vocabulary, which is currently not the case.

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.

2 participants