We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
let jsonObj: JSON.Obj = <JSON.Obj>(JSON.parse('{"value": 24}')); let value: JSON.Value = jsonObj.getValue("value")!; assert(!value.isNum) assert(value.isInteger) jsonObj = <JSON.Obj>(JSON.parse('{"value": 4.2}')); value = jsonObj.getValue("value")!; assert(value.isNum) assert(value.isFloat)
This happens because only Float extends Num, Integer doesn't extend it.
I'm only pointing this out because the README.md's example is incorrect, since the JSON parsed in it has an Integer and not a Num:
README.md
JSON
Integer
Num
{"hello": "world", "value": 24}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This happens because only Float extends Num, Integer doesn't extend it.
I'm only pointing this out because the
README.md
's example is incorrect, since theJSON
parsed in it has anInteger
and not aNum
:The text was updated successfully, but these errors were encountered: