I am just starting to explore on writing/parsing JSON using YAJL in RPGLE
I am encountering a situation were i need to parse a key with array of values
e.g. {"key":[value1,value2,value2]}
I am seeing examples to parse array of objects i.e. { "key" : [ {"k1":"v1"}, {"k2":"v2"} , {"k3":"v3"} ] }
list = YAJL_object_find(docNode: 'key');
i = 0;
dow YAJL_ARRAY_LOOP( list: i: node );
val = YAJL_object_find(node: 'k1');
value1 = yajl_get_string(val);
enddo;
But not for the array of values for single Key. Any idea how we can do this using YAJL in RPGLE.
Thanks in Advance..!!