Skip to content

Clarify handling of unknown fields by server/client #1144

Closed
@radeksimko

Description

@radeksimko

While the protocol is versioned there is no version negotiation capability, i.e. client nor server can tell what version of the protocol the other speaks. Because the protocol changes and later versions may introduce new fields, it seems necessary for both sides to tolerate and ignore unknown fields and assume that these are fields added in later (not yet supported) version of the protocol.

In languages such as Go, this determines whether or not it's appropriate to use "strict unmarshaling" of the JSON data where unknown fields are disallowed and unknown fields therefore result in an error.

My understanding based on the above is that "loose unmarshaling" (where unknown fields are ignored) is preferred in all client or server implementations of LSP - please correct me if I'm wrong here.

If I'm right - then would you be open to a PR to the spec which clarifies this by documenting explicitly that unknown fields are meant to be ignored by both server and client?

Metadata

Metadata

Assignees

No one assigned

    Labels

    info-neededIssue requires more information from poster

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions