json_encoder_start_object()
QNX SDP8.0JSON Library ReferenceAPIDeveloper
Start a new object in the JSON encoder
Synopsis:
#include <sys/json.h>
json_encoder_error_t json_encoder_start_object(json_encoder_t *encoder,
const char *name)
Arguments:
- encoder
- The JSON encoder instance.
- name
- The name of the object if it's being started within another object, or NULL if it's being started within an array or it was already named with json_encoder_add_property_name().
Library:
libjsonDescription:
This function starts encoding a new object with the given name in the current object or array in the given JSON encoder. Properties subsequently created in the encoder will be added to this object until the matching json_encoder_end_object() call.
Returns:
- JSON_ENCODER_OK
- Success.
- JSON_ENCODER_NO_MEMORY
- There is not enough memory to perform the operation.
- JSON_ENCODER_UNEXPECTED_NAME
- A name was provided for an object that was already named, or for an element in an array, which can't accept a name.
- JSON_ENCODER_MISSING_PROPERTY_NAME
- No name was provided for the object.
Page updated: