Function

judo_len

Array or object length.

Since v1.0
int32_t judo_len(
const judo_value *value)

Parameters πŸ”—

value in

An element of an array.

Return Value πŸ”—

The number of elements or members of an array or object, depending on the JSON type of value, or a negative integer indicating value is of a JSON type that has no length.

Discussion πŸ”—

The judo_len function returns the number of elements or members of an array or object, depending on the type of value. If value is an array type, the implementation returns the array’s length. If value is an object type, the implementation returns the number of members the object has. For any other JSON type, a negative integer is returned.