Tour data (requests and submissions) contain corrupt data in .rec file b/c of pretty-printing
jpmens opened this issue · comments
Jan-Piet Mens commented
Jan-Piet Mens commented
Same is occurring with cmd
and setWaypoints
:
2024-02-23T11:39:17Z cmd { 0A "_type": "cmd", 0A "action": "setWaypoints", 0A "waypoints": { 0A "_type": "waypoints", 0A "waypoints": [ 0A { 0A "_type": "waypoint", 0A "tst": 1708625557, 0A "rid": "my-region-id-1", 0A "desc": "home", 0A "rad": 100, 0A "lat": 30.0, 0A "lon": 40.0 0A }, 0A { 0A "_type": "waypoint", 0A "tst": 1708625558, 0A "rid": "my-region-id-2", 0A "desc": "work", 0A "rad": 100, 0A "lat": 30.1, 0A "lon": 40.1 0A } 0A ] 0A } 0A } 00
Jan-Piet Mens commented
It's not quite the same. When white-space and newline-filled JSON arrives at the recorder, we store in the .rec
files. If it contains newlines, they are mangled and then stored.
I fear the only short-term solution is decoding and stringifying.