Currently we have yyjson_is_num, but not yyjson_get_num. Instead, we have yyjson_get_{uint|sint|int|real}, which is problematic because an positive integer is both uintsintintreal as JSON has the only number type: number. In this case, we have to test for number type always because we can't force users write addition .0.
I'd like to have a yyjson_get_num, which returns double regardless of what the number type is.
Currently we have
yyjson_is_num
, but notyyjson_get_num
. Instead, we haveyyjson_get_{uint|sint|int|real}
, which is problematic because an positive integer is bothuint
sint
int
real
as JSON has the only number type:number
. In this case, we have to test for number type always because we can't force users write addition.0
.I'd like to have a
yyjson_get_num
, which returns double regardless of what the number type is.