Add macro json_is_boolean

This commit is contained in:
Petri Lehtinen 2009-07-28 11:36:53 +03:00
parent 2f4d6f8ae7
commit 08d712d038

View File

@ -38,6 +38,7 @@ typedef struct {
#define json_is_number(json) (json_is_integer(json) || json_is_real(json))
#define json_is_true(json) (json && json_typeof(json) == JSON_TRUE)
#define json_is_false(json) (json && json_typeof(json) == JSON_FALSE)
#define json_is_boolean(json) (jsin_is_true(json) || json_is_false(json))
#define json_is_null(json) (json && json_typeof(json) == JSON_NULL)
/* construction, destruction, reference counting */