Mini Program jump to pass parameters, to another page json.pase error?

tempFilePath data Array

clipboard.png

wx.navigateTo({
      url: `../add_mininote/index?audio=` + JSON.stringify({ serverPath: that.data.tempFilePath})
    })
  }
Unexpected end of JSON input;at "pages/add_mininote/index" page lifeCycleMethod onLoad function
SyntaxError: Unexpected end of JSON input
is there something wrong with onLoad? what is the cause?
{"serverPath": [{"tempFilePath": "http://tmp/wx6233646c3c24b6dd.o6zAJs5OCtd198A01IgZKsumvVWg.FI5bbM3dykEs3610ff761868f1a72382d40b8a8072af.durationTime
"
=
/usr/local/files/20180522/dbb931a2-8325-4ebf-bbff-970e090acc97wx6233646c3c24b6dd.o6zAJs5OCtd198A01IgZKsumvVWg.5gb46Kp0Bdgc1dab02c700decd62d36a2b7d06f085d1.durationTime=4515.mp3
Mar.13,2021

using JSON.parse requires strict compliance with the JSON specification.
solution:
convert the tempFilePath to the encodeURI () function, and that's fine.

Menu