Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

How to format json data for PowerBI (Error: “Additional characters were found at the end of the JSON

Hello. I am sending data from Node-RED to the Azure Blob Storage and use the Storage Account as a Data Source for Power BI. The messages that arrive to Node-RED are being saved in a json file (every day), which will be uploaded to the cloud at the end of the day. I have a problem with the format of these messages because I get this error when I try to edit the data in Power BI:

Details: "Additional characters were found at the end of the JSON entry."

Unfortunately I am inexperienced in this topic and don't know how to fix it.
These are the messages in my file:

{"timestamp": "2019-05-11T22:39:13.908347", "current_ma": 22, "voltage_mv": 229979, "energy_wh": 15, "power_mw": 0}
{"timestamp": "2019-05-11T22:39:18.843627", "current_ma": 22, "voltage_mv": 230069, "energy_wh": 15, "power_mw": 0}
{"timestamp": "2019-05-11T22:39:23.935679", "current_ma": 22, "voltage_mv": 229988, "energy_wh": 15, "power_mw": 0}
{"timestamp": "2019-05-11T22:39:28.865907", "current_ma": 21, "voltage_mv": 230048, "energy_wh": 15, "power_mw": 0}
{"timestamp": "2019-05-11T22:39:33.810613", "current_ma": 21, "voltage_mv": 230081, "energy_wh": 15, "power_mw": 0}

I used to have each one of these messages in one file but it was taking too much space, so I am guessing the problem has something to do with joining all the messages in one file. Maybe the separation between them?

  • Hi Anonymous ,

    By my tests and research, this error should be caused by your incorrect json format.

    Please correct your json format.

    By my test, if you mofify your json format like below, we could import the json file successfully.

    [
       {
          "timestamp":"2019-05-11T22:39:13.908347",
          "current_ma":22,
          "voltage_mv":229979,
          "energy_wh":15,
          "power_mw":0
       },
       {
          "timestamp":"2019-05-11T22:39:18.843627",
          "current_ma":22,
          "voltage_mv":230069,
          "energy_wh":15,
          "power_mw":0
       },
       {
          "timestamp":"2019-05-11T22:39:23.935679",
          "current_ma":22,
          "voltage_mv":229988,
          "energy_wh":15,
          "power_mw":0
       },
       {
          "timestamp":"2019-05-11T22:39:28.865907",
          "current_ma":21,
          "voltage_mv":230048,
          "energy_wh":15,
          "power_mw":0
       },
       {
          "timestamp":"2019-05-11T22:39:33.810613",
          "current_ma":21,
          "voltage_mv":230081,
          "energy_wh":15,
          "power_mw":0
       }
    ]

    Best  Regards,

    Cherry

     

4 Replies

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi Anonymous ,

    By my tests and research, this error should be caused by your incorrect json format.

    Please correct your json format.

    By my test, if you mofify your json format like below, we could import the json file successfully.

    [
       {
          "timestamp":"2019-05-11T22:39:13.908347",
          "current_ma":22,
          "voltage_mv":229979,
          "energy_wh":15,
          "power_mw":0
       },
       {
          "timestamp":"2019-05-11T22:39:18.843627",
          "current_ma":22,
          "voltage_mv":230069,
          "energy_wh":15,
          "power_mw":0
       },
       {
          "timestamp":"2019-05-11T22:39:23.935679",
          "current_ma":22,
          "voltage_mv":229988,
          "energy_wh":15,
          "power_mw":0
       },
       {
          "timestamp":"2019-05-11T22:39:28.865907",
          "current_ma":21,
          "voltage_mv":230048,
          "energy_wh":15,
          "power_mw":0
       },
       {
          "timestamp":"2019-05-11T22:39:33.810613",
          "current_ma":21,
          "voltage_mv":230081,
          "energy_wh":15,
          "power_mw":0
       }
    ]

    Best  Regards,

    Cherry

     

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi Anonymous ,

    Have you solved your problem?

    If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

    If you still need help, please feel free to ask.

    Best  Regards,

    Cherry

     

    • carlacl9's avatar
      carlacl9
      Regular Visitor

      Hello, I have the same problem I have an adf that automatically saved in my container Azure Blob Storage which use it as a source of data for power bi, the information in my adf are saved in JSON format every time you run a pipeline, when I try to get the data in power bi I get this error

       
       
       
       

      one of the options i tried was transforming it to text and then to json but i keep getting this message:

       

      I hope you can help me.

      Thank you

  • carlacl9's avatar
    carlacl9
    Regular Visitor

    Hello, I have the same problem I have an adf that automatically saved in my container Azure Blob Storage which use it as a source of data for power bi, the information in my adf are saved in JSON format every time you run a pipeline, when I try to get the data in power bi I get this error

     
     
     
     

    one of the options i tried was transforming it to text and then to json but i keep getting this message:

    I hope you can help me.

    Thank you