json_encoder_add_property_name()
QNX SDP8.0JSON Library ReferenceAPIDeveloper
Create a property in the JSON encoder
Synopsis:
#include <sys/json.h>
json_encoder_error_t json_encoder_add_property_name(json_encoder_t *encoder,
const char *name)
Arguments:
- encoder
- The JSON encoder instance.
- name
- The new property's name.
Library:
libjsonDescription:
This function creates a property with the given name in the current object or array in the given JSON encoder. The value for the property is provided in a subsequent json_encoder_add_*() or json_encoder_start_*() call with NULL passed in for the function's name parameter.
Returns:
- JSON_ENCODER_OK
- Success.
- JSON_ENCODER_NO_MEMORY
- There is not enough memory to perform the operation.
- JSON_ENCODER_MISSING_PROPERTY_NAME
- No name was provided for the property.
Page updated: