ParserConfigObject

Describes parser configs that you can set when connecting to JSON or CSV data using the client-side parser.

Properties

Property/TypeDescription
dataHasHeaderBooleanoptionalSpecifies whether the data contains field names (true) or not (false). When set to false, the first data record will be treated as a record with values, and field names in the component will be autogenerated. Learn more about loading JSON and CSV data without field names. Default value: true.
delimiterStringoptionalOnly for CSV. Specifies which delimiter is used in the file: ",", ";", "|", or "\t". If the delimiter is not set, Flexmonster will autodetect the delimiter used in the file. Learn more about specifying the delimiter.
recordDelimiterStringoptionalOnly for CSV. Specifies which record delimiter is used in the file: "\n" or "\r\n". If the recordDelimiter is not set, Flexmonster will autodetect the record delimiter used in the file. Learn more about specifying the record delimiter.
decimalSeparatorStringoptionalOnly for CSV. Specifies which character separates decimal parts of numbers in the file: "." or ",". Learn more about specifying the decimal separator.

Example

const dataSource = {  
  type: "csv",  
  url: "<url to the file>",  
  parser: {  
    dataHasHeader: "false",  
    delimiter: ";",  
    recordDelimiter: "\r\n",  
    decimalSeparator: ","  
  }  
};

See also