Add items from a JSON decoder to the JSON encoder
#include <sys/json.h>
json_encoder_error_t json_encoder_add_from_decoder(
json_encoder_t *encoder,
const char *name,
json_decoder_t *decoder,
const char *prop_name);
This function adds the items from the given or current property node in the given JSON decoder to the specified or current object or array in the given JSON encoder. This allows data that was previously decoded to be re-encoded.
The state of the decoder is not changed; when the function call completes, the decoder is in the same state as before the call.