-
Notifications
You must be signed in to change notification settings - Fork 27
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
External tag #316
base: master
Are you sure you want to change the base?
External tag #316
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -250,6 +250,27 @@ It's represented in JSON to: | |
In a similar way to a record type, undefined fields in a payload are ignored | ||
by deserializer. | ||
|
||
If '@external-tag' annotation is given on tag below example: | ||
|
||
union name = | ||
@external-tag | ||
east-asian-name ( text family-name, text given-name ) | ||
| ... | ||
; | ||
|
||
It's representated in JSON to: | ||
|
||
{ | ||
{ | ||
"east-asian-name": { | ||
"_type": "name", | ||
"_tag": "east-asian-name", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This field might be not necessary, because it already presented above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And, I think |
||
"family_name": "Hong", | ||
"given_name": "Minhee" | ||
} | ||
} | ||
} | ||
} | ||
|
||
Option type | ||
----------- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,8 @@ union shape | |
point upper-left, | ||
point lower-right | ||
) | ||
| circle (point origin, offset radius) | ||
| @external-tag | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the |
||
circle (point origin, offset radius) | ||
; | ||
|
||
// This is comment. Note that there are important differences between | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"description": "Serialize into external tag when gives 'external-tag' annotation", | ||
"type": "fixture.foo.etag", | ||
"input": { | ||
"etag": { | ||
"_type": "external_tag_union", | ||
"_tag": "etag", | ||
"etag": 1 | ||
} | ||
}, | ||
"normal": { | ||
"etag": { | ||
"_type": "external_tag_union", | ||
"_tag": "etag", | ||
"etag": 1 | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changelogs should be the past tense. Also the following explanation does not have enough information: