Options for controlling JSON encoding behavior
Synopsis:
#include <sys/json.h>
typedef enum {
JSON_ENCODER_CLEAR_MEMORY = 1,
JSON_ENCODER_AUTO_FORMAT = 2,
JSON_ENCODER_FILE_FORMAT = 4
} json_encoder_option_t;
Data:
- JSON_ENCODER_CLEAR_MEMORY
Clear (set to zero) allocated memory before freeing it.
- JSON_ENCODER_AUTO_FORMAT
Include newlines and spaces to make output more readable (though less compact).
- JSON_ENCODER_FILE_FORMAT
Include newlines and spaces on first-level properties.
Library:
libjson