Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Raw export JSON invalid

Discussion in 'Unity Analytics' started by coshea, Jul 29, 2020.

  1. coshea

    coshea

    Joined:
    Dec 20, 2012
    Posts:
    277
    Hi
    I thought I'd make my own heatmap using custom events for debug during testing. I exported some custom event data from Unity Analytics, went to load it in the JSON parser in Unity and got an error "JSON parse error: The document root must not follow by other values."

    I copied the JSON output from the portal into various JSON validators, they all came back fail. Multiple JSON root elements

    Analytics raw output is like this:

    {"name":"event","userid":"123"}
    {"name":"event","userid":"123"}
    {"name":"event","userid":"123"}

    so Isn't valid JSON. Shouldn't it output something like this?

    [{"name":"event","userid":"123"},
    {"name":"event","userid":"123"},
    {"name":"event","userid":"123"}]

    Thanks
     
  2. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    270
    It seems some error occurred at that time, could you try it again?
     
  3. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,608
    Each data row in Raw Data Export is it's own JSON document, by design.
     
unityunity