I've been trying to use the Export Web Map Tool in ArcToolbox to export one of my local ArcGIS Server maps to PDF.
Every time I keep getting the error 'Invalid JSON in WebMap'
Rather handily, ESRI do not actually say where the JSON is for local maps, but just keep referring to what a generic specification should look like, which to anyone who is a webmap novice is about as handy as a hot poker up the rear.
So does anybody know where exactly the JSON is for a map created with ArcGIS Server?
The location I tried was: http://<server name>/arcgis/rest/services/MyMap/MapServer?f=pjson
And I have also tried every other JSON link I could find whilst browsing around, but with no luck.
Any help appreciated in what should probably be a simple task.
I would point out that the link you mentioned (http://<server name>/arcgis/rest/services/MyMap/MapServer?f=pjson) gives you JSON that describes a service...not a 'Web Map'.
The Web Map JSON generally has to be constructed - usually by an application that has a web map somewhere. For example, look at some of the samples for the PrintTask module in the JavaScript API (e.g., https://developers.arcgis.com/en/javascript/jssamples/widget_print_webmap.html). What that module does is dynamically generate the JSON text based on the existing Map object that displays the map the application. If you capture the requests that are submitted to the ExportWebMap printing service in a browser's Dev console, you can see the web map JSON that is submitted...which would follow the specification that ciava.at linked to above.