-
Notifications
You must be signed in to change notification settings - Fork 526
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
Unable to use JSON RPC #495
Comments
Hello @Karrq,
We need to check if this extra restriction is common and really makes sense. If not we will remove it. |
It seems indeed that each element in an array may be of a different type. |
Hi, thanks for the quick response.
I tried running the payload as you suggested (btw the rpc endpoint I
provided is public), and I got an error _as a response_.
`{"id":1,"error":{"code":-32602,"message":"invalid argument 1: json: cannot
unmarshal string into Go value of type bool"},"jsonrpc":"2.0"}`
EDIT:
While writing this response I saw you verified that elements in JSON arrays
can be of different types.
I'm surprised no other users found this before!
May I sneak in a feature request? Some kind of interface in hurl for
JSON-RPC?
Il giorno sab 5 mar 2022 alle ore 15:44 Fabrice Reix <
***@***.***> ha scritto:
… Hello @Karrq <https://github.com/Karrq>,
For JSON parsing, we have added the check that all items in an array
should have the same type.
Can you use this payload instead?
POST https://rpc.flashbots.net/
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["0x5E3A3F", "true"]
}
We need to check if this extra restriction is common and really makes
sense. If not we will remove it.
—
Reply to this email directly, view it on GitHub
<#495 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6QBYZRPVTCHZK2A7HLU4TU6NXNLANCNFSM5P7WCJTA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Until the next release, you can send your exact payload with a mutiline string
The JSON won't be decoded by Hurl. I'm not familiar with JSON-RPC. What kind of feature would you like? |
If I need to check the types of the elements in an array are the same, how do I do this? |
Hi, you can use
We'll improve this with in a future version an |
But in the practical sense, the elements in an array usually are complex structures of the same type. It's hard to predict in such sense. |
you might probably be happy with a schema validation (#543) |
Hi, I was interested in trying this tool to make a series of requests easily reproducible or parametrized but I was stuck immediately when attempting to make a json rpc request.
Here's the sample:
When running with
hurl file.hurl
I get the following error:But I tried to verify this payload and had no issue with it, even using it in postman without any trouble... Am I missing something here?
The text was updated successfully, but these errors were encountered: