You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like strict more... jsonrpc provides a way to send arbitrary data in a params field, so I don't see a reason why someone would need to use other fields
While there is the params field for requests, for responses there is just result or error.
The use case that I have for extra top-level fields is that in some languages it's really annoying to have to deserialize untagged unions. The easy fix is to add an extra tag, that can then be ignored by tools that don't need to look for it. If I ever want to look at a JSON RPC response that I know my code serialized, I can look for that extra field, treat it as a tag, and then deserialize according to the value of that tag.
I would like to urge you all to add this back as an option. We would love to make use of it in LanguageClient-neovim. Language Server Protocol clients want to be as permissive as possible to accommodate as many language servers as possible (consider: we can't fix all the language servers, so we try to accomodate them).
A flag to optionally skip the deny_unknown_fields would be appreciated.
The text was updated successfully, but these errors were encountered:
This feature request is a follow up to this PR:
#448
Specifically, there was a comment:
While there is the
params
field for requests, for responses there is justresult
orerror
.The use case that I have for extra top-level fields is that in some languages it's really annoying to have to deserialize untagged unions. The easy fix is to add an extra tag, that can then be ignored by tools that don't need to look for it. If I ever want to look at a JSON RPC response that I know my code serialized, I can look for that extra field, treat it as a tag, and then deserialize according to the value of that tag.
I would like to urge you all to add this back as an option. We would love to make use of it in LanguageClient-neovim. Language Server Protocol clients want to be as permissive as possible to accommodate as many language servers as possible (consider: we can't fix all the language servers, so we try to accomodate them).
A flag to optionally skip the
deny_unknown_fields
would be appreciated.The text was updated successfully, but these errors were encountered: