-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
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:
{"hello": "world", "value": 24}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels