jsonParser - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English
#include "xf_data_analytics/dataframe/json_parser.hpp"
template <
    int PU_NUM = 4,
    int COL_NUM = 16,
    int ARRAY_BW = 4,
    int FIELD_BW = 4,
    int TYPE_BW = 4,
    int VALID_BW = 4,
    int DATA_BW = 64
    >
void jsonParser (
    ap_uint <128>* json_buf,
    ap_uint <8>* schema,
    hls::stream <ObjectEx>& o_obj_strm
    )

read one standard JSON file from DDR and parse into object stream according to given schema

Parameters:

PU_NUM number of paralleled JSON parse core, only support 2/4/8
COL_NUM maximum supported number of columns, should be power of 2 and less than or equal to 2^FIELD_BW
ARRAY_BW bit width of index for each element in array (all 1’s represent for the last element of the array or non-array value)
FIELD_BW bit width of number of fields (columns)
TYPE_BW bit width of data type (including line separator / end of file etc.)
VALID_BW bit width of number of valid bytes in data (from LSB)
DATA_BW bit width of data
json_buf buffer of JSON file to be parsed
schema key name, nested status, and data type of value for each column
o_obj_strm output object stream for selected columns