Forum Discussion
Hello Guru2
I am not familiar with grpc protocol, but your sample looks a little JSON ish... I will just base this suggestion on what I am guessing is JSON request and response... I could be completely off track so discard if this has nothing to do with JSON. 🙂
I am pretty sure JSON has no specification for order. If you provide original JSON and send it to any JSON interpreter, you might not get the same result in its output as originally consumed. I have seen code samples to force JSON to keep order, but if I am on the wrong track here to begin with, I don't want to spend time continuing research on that. If this is JSON related, you would need to sort both input and output to be consistent for comparison.
Regards,
Todd
Just a follow up FYI for you regarding the json order/unorder (unorder....ia that even a word? Never mind...rhetorical!)
The definition of a json object is an "unordered list of name/value pairs".
If you want the contents of an object in a particular sequence, you have to do things like embed it in an array, etc.
Cheers
Rich
- sonya_m3 years agoSmartBear Alumni (Retired)
Thanks, Community!
Guru2 please let us know if the advice helps!
- Guru23 years agoOccasional Contributor
Hi Sonya,
Thanks for asking. My query was not solved because this is not a json request/response. Still could not understand how readyapi encodes the request data to server when the grpc request created using the unary call imported from .proto file. So tried modifying the default request data in the grpc unary call based on how we implemented in our code. That modification did not helped, it throws "invalid input length" error after modifying. Any suggestions how to proceed further? How this request data is being set when creating grpc request using the imported API definition? Kindly let me know.
Thanks,
Guru
- Guru23 years agoOccasional Contributor
When sending request from readyapi to some server using grpc. Are some bytes getting padded in the json request or its re-ordered? How this encoding is happening in readyapi while sending request? Kindly let me know your thoughts on this.
Thanks,
Guru
Related Content
- 11 years ago
Recent Discussions
- 21 days ago