i Face A issue in proto files nullable fields

25 views
Skip to first unread message

Ahmed Ali

unread,
Oct 20, 2024, 2:36:41 PM10/20/24
to grpc.io
I created a gRPC method that returns a response with some fields as null and some as strings. When I view the response in Postman, the null values are converted to empty strings. I need the null values to be returned as null. I also used oneof for this, but if the value from the database is null, it's not an issue. However, if the value is a string, gRPC throws an error. How can I handle null values?
Reply all
Reply to author
Forward
0 new messages