inspector icon indicating copy to clipboard operation
inspector copied to clipboard

It is not possible to enter `1.0` as a value

Open mrexodia opened this issue 1 month ago • 1 comments

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:

  1. Type 1. in the parameter field
  2. 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.

mrexodia avatar Nov 15 '25 02:11 mrexodia

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.

olaservo avatar Nov 23 '25 23:11 olaservo