Wraps jsonlite::unbox() so a length-1 value serializes as a JSON scalar
instead of a 1-element array, while NULL/empty input returns NULL (which
serializes as JSON null or is dropped) instead of []. The [] case is a
common footgun: a frontend doing if (x) or x[0] misbehaves on an empty
array where it expected a scalar or null.