-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Hexadecimal interpreted as number #61
Comments
JSON doesn't support hexadecimal notation. Also this number is far too big to be represented accurately in JSON. |
I don't understand what JSON has to do with the problem I'm pointing. The problem is that it converts the hexadecimal to a number where it should stay as a string (and not try to convert something without knowing what's the underlying type) as per the specification https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#data-types « Tools that do not recognize a specific format MAY default back to the type alone, as if the format is not specified. » |
The schema editor is for JSON Schema, that's what it's got to do with JSON. The quote you pulled from the specification has to do with validating schemas based on the |
Ok, I think I was not clear in my explication. Here, what's work https://imgur.com/r7U467y , you can see that the format is |
There is nothing stopping you writing JSON Schemas which have contradictions. The component is an editor, not a JSON Schema validator. If you think the handling of numeric entry for insanely large numbers is incorrect, the repo is here: https://github.com/josdejong/jsoneditor |
Fair point, thank you! I'll see over there. |
The same behavior can't be reproduced in the latest version of the jsoneditor over at https://jsoneditoronline.org/ and the version of jsoneditor embedded is 3 years old, I guess the issue lies somewhere between the 5.7.2 and the latest 9.0.3 version! |
Ok, let me look at how much work it is to update the dependency. Thanks. |
Squashed commit of the following: commit 783c21aa1fe66791fbe9eb88a28f147305b97b2f Author: Mike Ralphson <[email protected]> Date: Thu Jul 23 11:20:43 2020 +0100
Can you try now and see if the issue is resolved? |
The issue is not solved, the editor is way better though but I still need to add an extra |
When entering a hexadecimal (e.g: 0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a) string in the schema editor in the value, it get converted to a number « 2.264731349119913e+115 » instead of sticking to the hexadecimal reprensation.
The text was updated successfully, but these errors were encountered: