-
Notifications
You must be signed in to change notification settings - Fork 1.2k
SqlRowConverter
does not implement JsonConverter
#7715
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
Comments
SqlRowConverter
does not implement serializationSqlRowConverter
does not implement JsonConverter
Hi, @felix-stnr. Why are you serializing the response? The response types are only expected to be deserialized from the JSON sent by the server. We don't guarantee that they will be serializable unless used on requests. |
Hi there. The main reason why I wanted to serialize the response is that I want to forward it to another client, which relies on a specific JSON format. Since the |
@felix-stnr Yes, this is by design in the client (for now, at least) since it's a read-only type from our perspective. We recommend that consumers convert data from our types to their own types before sending data downstream. I'm going to close this issue, and we can always revisit it if this use case comes up regularly. |
Elastic.Clients.Elasticsearch version: 8.1.1
Elasticsearch version: 8.7.0
.NET runtime version: .NET 7.0.23
Operating system version: Windows 11
Description of the problem including expected versus actual behavior:
The
SqlRowConverter
, which is located within theSqlRow
class (see here) overrides the methodWrite
from theJsonConverter
base class. However, this method is not implemented yet and hence always throws aNotImplementedException
. Thus, serializing the response will always lead to an exception. To fix this bug theWrite
method should be correctly overwritten/implemented.Maybe this issue is related to #7713.
The text was updated successfully, but these errors were encountered: