Is there a way to create a WebMap using ArcGIS REST API formatted JSON? What I would like to do is construct a map using a webmap defined in a JSON file on the same server as the web application rather than getting the JSON from ArcGIS Online (by providing an AGOL item id corresponding to a webmap).
Obviously, when you construct a WebMap object by providing an AGOL webmap item id, there must be code in the API that is parsing the returned JSON, but I am not finding any documented way to construct a webmap without hosting the map on ArcGIS Online or on a Portal.