True, False and Null
====================
-These values are implemented as singletons, so each of these functions
-returns the same value each time.
+These three values are implemented as singletons, so the returned
+pointers won't change between invocations of these functions.
.. function:: json_t *json_true(void)
Returns the JSON false value.
+.. function:: json_t *json_boolean(val)
+
+ .. refcounting:: new
+
+ Returns JSON false if ``val`` is zero, and JSON true otherwise.
+ This is a macro, and equivalent to ``val ? json_true() :
+ json_false()``.
+
+ .. versionadded:: 2.4
+
+
.. function:: json_t *json_null(void)
.. refcounting:: new
modifying the structure or contents of a value reachable from
``root``.
- If the ``O`` and ``o`` format character are not used, it's
+ If the ``O`` and ``o`` format characters are not used, it's
perfectly safe to cast a ``const json_t *`` variable to plain
``json_t *`` when used with these functions.