strings2bits()
#
Convert a JSON array of strings to a bitmask based on a predefined mapping. Works with json_t *
.
Prototype
PUBLIC uint64_t strings2bits(
json_t *jn_strlist,
const char *bit_names[]
);
Parameters
Key |
Type |
Description |
---|---|---|
|
The JSON array of strings to convert. |
|
|
|
The array of strings corresponding to bit positions. |
Return Value
Returns a uint64_t
bitmask representing the active bits from the JSON array.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples