Closed antifa-ev closed 6 years ago
I've had mixed results with changing the extension to just ".json". Sometimes it works. But after a few times, it then appears to stop working. I can't figure out the randomness, which is weird.
I'm able to open an externally created .json file. Save it as .geojson. But then I can't open the re-saved file.
I agree with Antifa. I removed the "properties": null,
and the file now works.
I looked at old .geojson files I have from prior saves, and they don't have the null. So that must have been introduced with latest JOSM version.
I had the same problem, remove '"properties": null,' allows me to open the file.
@jreijn with latest changes the example described in this ticket results in following exception:
java.lang.ClassCastException: javax.json.JsonValueImpl cannot be cast to javax.json.JsonObject
java.lang.ClassCastException: javax.json.JsonValueImpl cannot be cast to javax.json.JsonObject
at org.glassfish.json.JsonObjectBuilderImpl$JsonObjectImpl.getJsonObject(JsonObjectBuilderImpl.java:242)
at org.openstreetmap.josm.plugins.geojson.GeoJsonReader.getTags(GeoJsonReader.java:228)
at org.openstreetmap.josm.plugins.geojson.GeoJsonReader.fillTagsFromFeature(GeoJsonReader.java:217)
at org.openstreetmap.josm.plugins.geojson.GeoJsonReader.parseLineString(GeoJsonReader.java:145)
at org.openstreetmap.josm.plugins.geojson.GeoJsonReader.parseGeometry(GeoJsonReader.java:107)
at org.openstreetmap.josm.plugins.geojson.GeoJsonReader.parseFeature(GeoJsonReader.java:88)
at org.openstreetmap.josm.plugins.geojson.GeoJsonReader.parseFeatureCollection(GeoJsonReader.java:81)
at org.openstreetmap.josm.plugins.geojson.GeoJsonReader.parseRoot(GeoJsonReader.java:64)
at org.openstreetmap.josm.plugins.geojson.GeoJsonReader.parse(GeoJsonReader.java:55)
at org.openstreetmap.josm.plugins.geojson.GeoJsonReader.doParseDataSet(GeoJsonReader.java:240)
at org.openstreetmap.josm.plugins.geojson.GeoJsonFileImporter.importData(GeoJsonFileImporter.java:46)
at org.openstreetmap.josm.gui.io.importexport.FileImporter.importDataHandleExceptions(FileImporter.java:95)
Thanks guys!
I use geojson 84 with JOSM 14026 (JRE 9) and can't open any GeoJSON again which I just saved from JOSM. Here is a basic non-working example:
I assume that it's because the line
"properties": null,
in the json.Anyone else with this problem?