func X3.EN_JSON_TO_ARRAY(Clbfile JSON_IN, Clbfile() ARRAY_OUT) : Integer

Split the json stream into an array of json for a collection

  • JSON_IN Clbfile Original Clob containing the Json stream
  • ARRAY_OUT Clbfile() Clob array containing Json records
Return Integer Number of entries
Example

# Opening the json file description of the current solution folders
Local Clbfile TAB_CLB(8)(10)
Local Clbfile JSON(8)
Openi filpath("","FOLDERS","json","X3_PUB") Using [FIC]
Iomode adxifs '' Using [FIC] : Iomode adxirs '' Using [FIC] : Iomode adxium 8 Using [FIC]
Rdseq [L]JSON Using [FIC] : Openi Using [FIC]
# Retrieves the streams {} of the key "folders" in the clob array [L]TAB_CLB and displays the number of folders present
Infbox num$(func X3.EN_JSON_TO_ARRAY(func X3.EN_JSON_GET_VALUE([L]JSON, "folders"), [L]TAB_CLB))