Use kind
rather than type
as discriminator in MF2 JSON data model
#628
lucacasonato
started this conversation in
Feedback
Replies: 1 comment 1 reply
-
One issue with Regarding
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Many languages use
type
as a keyword, which makes naming fields of (deserialised) structstype
difficult. An example of this is Rust, where naming struct propertiestype
is not possible without doing a fun dance of prefixing the field withr#
.Right now MF2 uses
"type"
as the discriminator in the JSON data model.Can I suggest you use
"kind"
as the name for this discriminator to avoid this inconvenience?kind
is generally not used as a keyword in programming languages.Beta Was this translation helpful? Give feedback.
All reactions