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
An empty array in DocumentSymbolResponse is always interpreted as Flat([]). When the server is known to always return a Nested result, this makes it inconvenient to handle the result. A similar situation happens with GotoDefinitionResponse, where an empty array is always assumed to be an array of Locations instead of LocationLinks.
Would it be worthwhile to provide an option to control which variant an empty array deserializes as? It can be implemented by declaring an alternative enum with different ordering of variants, but that seems a bit boilerplate.
The text was updated successfully, but these errors were encountered:
An empty array in
DocumentSymbolResponse
is always interpreted asFlat([])
. When the server is known to always return aNested
result, this makes it inconvenient to handle the result. A similar situation happens withGotoDefinitionResponse
, where an empty array is always assumed to be an array ofLocation
s instead ofLocationLink
s.Would it be worthwhile to provide an option to control which variant an empty array deserializes as? It can be implemented by declaring an alternative enum with different ordering of variants, but that seems a bit boilerplate.
The text was updated successfully, but these errors were encountered: