Updated nlohmann::basic_json::is_number (markdown)

Niels committed 2015-04-12 16:14:19 +02:00
1 parent 13332f76f2
commit f8f9dc7700
1 file changed
+10 -10
+10 -10
@@ -37,24 +37,24 @@ int main()
nlohmann::json j_array = {1, 2, 4, 8, 16}; nlohmann::json j_array = {1, 2, 4, 8, 16};
nlohmann::json j_string = "Hello, world"; nlohmann::json j_string = "Hello, world";
std::cout << std::boolalpha << j_null.is_null() << '\n'; std::cout << std::boolalpha << j_null.is_number() << '\n';
std::cout << std::boolalpha << j_boolean.is_boolean() << '\n'; std::cout << std::boolalpha << j_boolean.is_number() << '\n';
std::cout << std::boolalpha << j_number.is_number() << '\n'; std::cout << std::boolalpha << j_number.is_number() << '\n';
std::cout << std::boolalpha << j_object.is_object() << '\n'; std::cout << std::boolalpha << j_object.is_number() << '\n';
std::cout << std::boolalpha << j_array.is_array() << '\n'; std::cout << std::boolalpha << j_array.is_number() << '\n';
std::cout << std::boolalpha << j_string.is_string() << '\n'; std::cout << std::boolalpha << j_string.is_number() << '\n';
} }
``` ```
### Output ### Output
``` ```
false
false
true true
true false
true false
true false
true
true
``` ```
## See also ## See also