richsmith / sexytopo

The SexyTopo cave surveying app for Android
GNU General Public License v3.0
29 stars 13 forks source link

None of the files generated by SexyTopo pass JSON validation #220

Open JPCASSOU opened 1 month ago

JPCASSOU commented 1 month ago

Files generated by SexyTopo: None of these files pass JSON validation SexyTopo can be corrupt JSON files

by https://jsonlint.com/

Croignon.ext-elevation.json { "paths": [], "labels": [], "symbols": [], "x-sections": [] }s": [] }

Croignon.plan.json { "paths": [], "labels": [], "symbols": [], "x-sections": [] }s": [] }

Croignon.metadata.json:

Error: Parse error on line 18680: ... } ]} "distance": 3.599999 --------------------^ Expecting 'EOF', '}', ',', ']', got 'STRING'

{ "active-station": "286.3", "connections": {} } }

Croignon.data.json:

"distance": 7.139999866485596, "azimuth": 234, "inclination": 0, "destination": "286.2", "wasShotBackwards": false, "index": 1176, "promotedFrom": [] } ] }, { "name": "286.2", "eeDirection": "right", "comment": "", "legs": [] } ] } "distance": 3.5999999046325684, "azimuth": 255, "inclination": 0, "destination": "286.3", "wasShotBackwards": false, "index": 1177, "promotedFrom": [] } ] }, { "name": "286.3", "eeDirection": "right", "comment": "", "legs": [] } ] } {

Following GHTopo generated files passes JSON validation but causes warnings loading in SexyTopo

Croignon_ghtopo.ext-elevation.json Croignon_ghtopo.metadata.json Croignon_ghtopo.plan.json Croignon_ghtopo.data.json

CaverBruce commented 1 month ago

I've just checked a random bunch of Sexy Topo files, and they all pass the jasonlint validator. I think we are up to version 1.8.2, and unfortunately i don't have any recent data at hand. I have some older survey sets and they all pass the tests as valid json files. For example...

"sexyTopoVersionName": "1.7.0", "sexyTopoVersionCode": 72, "name": "Col cave A",

"sexyTopoVersionName": "1.6.0",
"sexyTopoVersionCode": 63,
"name": "ME-81-GLMESurface",

"sexyTopoVersionName": "1.4.6",
"sexyTopoVersionCode": 60,
"name": "DwarfsD-K1",

"sexyTopoVersionName": "1.3.10",
"sexyTopoVersionCode": 52,
"name": "ME-80-AngelicaTopSurface",