Skip to content

Commit a39c5d2

Browse files
Add jsont::is_boolean
return true if a property is either true or false.
1 parent 0c1e0f4 commit a39c5d2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/util/json.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ class jsont
6161
return kind==kindt::J_ARRAY;
6262
}
6363

64+
bool is_boolean() const
65+
{
66+
return kind == kindt::J_TRUE || kind == kindt::J_FALSE;
67+
}
68+
6469
bool is_true() const
6570
{
6671
return kind==kindt::J_TRUE;

0 commit comments

Comments
 (0)