Select to view content in your preferred language

Export/import web map's json

699
3
Jump to solution
10-07-2022 04:58 PM
forestknutsen1
MVP Regular Contributor

How do I export and then import a web map's json with python? I took a quick look at the GIS module... but I did not see the right call. 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

For exporting, use Item.get_data().

jcarlson_0-1665233676208.png

For importing? As @DanPatterson 's linked post mentions, you'll probably want to use the json module to make sure your JSON is formatted properly. To pass your modified JSON back to the map, just use Item.update(item_properties={'text':your_JSON_obj}).

- Josh Carlson
Kendall County GIS

View solution in original post

3 Replies
DanPatterson
MVP Esteemed Contributor

related links using the json module

Solved: Can't create a valid Web Map from a JSON definitio... - Esri Community


... sort of retired...
jcarlson
MVP Esteemed Contributor

For exporting, use Item.get_data().

jcarlson_0-1665233676208.png

For importing? As @DanPatterson 's linked post mentions, you'll probably want to use the json module to make sure your JSON is formatted properly. To pass your modified JSON back to the map, just use Item.update(item_properties={'text':your_JSON_obj}).

- Josh Carlson
Kendall County GIS
forestknutsen1
MVP Regular Contributor

@jcarlson thanks! that did the trick

0 Kudos