Data360 Analyze

 View Only
  • 1.  Parsing error reading (.log) files

    Posted 12-06-2022 04:09
    I'm using a Directory List node to read a file into a Json Data node.

    The problem i have is that:

    When the file is in a (.log) format, as it should be. I can't get an output on the Json Data node "Invalid UTF-8 middle byte 0x74" which i
    interpet as a parsing error.

    If i save the file as a (.Json) format, i get an output on the Json node.


    Does anyone know how i can solve this problem, reading the (.log) file in a Json Data node?
    (The content in the file is Json code)

    Best regards

    H

    ------------------------------
    Henrik B
    Knowledge Community Shared Account
    ------------------------------


  • 2.  RE: Parsing error reading (.log) files

    Employee
    Posted 01-04-2023 05:24
    The input data is probably not UTF-8 encoded. When you save the file the file will indicate the encoding used. Opening the file in Notepad++ will show the encoding for the file.

    The JSON Data node provides the 'Charset' property. The help text for the property states:

    Optionally specify the character set to be used when processing the structured data. Some common examples are ASCII, UTF-8, UTF-16, UTF-32.
    The default value depends on the source of the data to parse. If the data comes from an input field of type string, then the Data360 Analyze server character set is used as a default.
    If the data comes from an input field of type unicode, then UTF-8 is used as a default.
    If the data comes from a file, the default depends on the type of file being processed.


    ------------------------------
    Adrian Williams
    Precisely Software Inc.
    ------------------------------