Skip to content
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

yajl "number" type does not reject blank arguments #4

Closed
bovine opened this issue Nov 2, 2011 · 1 comment
Closed

yajl "number" type does not reject blank arguments #4

bovine opened this issue Nov 2, 2011 · 1 comment

Comments

@bovine
Copy link
Member

bovine commented Nov 2, 2011

If the "number" type is used to generate JSON, then yajl-tcl does not detect and reject a blank argument, making it possible to emit invalid JSON code.

#!/usr/local/bin/tclsh8.5
package require yajltcl
set x [yajl create #auto]
$x array_open
$x string type number 12 number 34 number "" number 56
$x array_close
puts [$x get]
@bovine
Copy link
Member Author

bovine commented Nov 2, 2011

It will now reject blank values. However, it is still possible to supply non-numeric values which would still generate possibly invalid JSON...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant