Add implementation of is_integer for json

This commit is contained in:
Danny Robson 2012-04-20 18:06:30 +10:00
parent 17667f991f
commit 4ca3438fa1

View File

@ -231,6 +231,25 @@ struct parse_context {
}%% }%%
//
// External support
//
template <>
bool
is_integer (const json::number &node) {
return is_integer (node.native ());
}
template <>
bool
is_integer (const json::node &node) {
return node.is_number () &&
is_integer (node.as_number ());
}
// //
// Node // Node
// //