Printing json

assemble_json_print_size

uint assemble_json_print_size(AJsonValue *value, uint indentation);

Description: Computes the number of bytes needed to store the resulting JSON generated by a value tree (without termination). The param "indentation" indicates the number of tabs added to each line of jason (usualy 0).

assemble_json_print

uint assemble_json_print(char *array, AJsonValue *value, uint indentation);

Description: Writes out JSON generated by a value tree to the pointer "array". The resulting array is not null terminatred. Use assemble_json_print_size to make sure enough memory is available to write out the entire structure. The param "indentation" indicates the number of tabs added to each line of jason (usualy 0).

assemble_json_print_allocate

char *assemble_json_print_allocate(AJsonValue *value);

Description: Allocates enough memory and writes out JSON generated by a value tree and returns the pointer. The user of this function is responsible for freeing the array. The array is null terminated.