It is not possible to enter `1.0` as a value
Inspector Version
- 0.17.2
Describe the bug
It is not possible to enter 1.0 as a parameter value.
To Reproduce Steps to reproduce the behavior:
- Type
1.in the parameter field - Press
0
Expected behavior
See 1.0 in the parameter field, it reverts back to 1 instead.
- OS: Windows
- Browser Chrome
Additional context
I need to receive a JSON-RPC call containing 1.0, because just 1 will be converted to an integer in my language (Python):
>>> type(json.loads("1"))
<class 'int'>
>>> type(json.loads("1.0"))
<class 'float'>
Version Consideration
Inspector V2 is under development to address architectural and UX improvements. See CONTRIBUTING.md for information about V2 development.
I think this is more of a limitation of JavaScript and JSON than an issue with the Inspector, so one way we might handle this is by saving and serializing the float values as strings, which could then parsed in the server as floats. We could also try to add a raw json mode to these fields. Not sure yet what would be the best way to handle this.