fullstorydev / grpcurl

Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers
MIT License
10.39k stars 496 forks source link

Unable to pass a JSON file in grpcURL #313

Closed shim1998 closed 2 years ago

shim1998 commented 2 years ago

Getting this error while passing a JSON file.

error getting request data: bad input: expecting start of JSON object: '{' ; instead got abc:def

Here's my sample JSON request

grpcurl -plaintext -proto some.proto -format json -d @ server.proto.com < sample.json

And my JSON file

{"hello":["abc:def",],"sample":{"ghi_id":[1]}}

Similar HTTP request works for me which is why I am confused what the error is.

shim1998 commented 2 years ago

resolved, it was the formatting of gRPC server, I was using. However, would want insight on what the valid JSON format is in gRPC.