archivematica
archivematica copied to clipboard
Use json.loads in OutputClientScriptJob
What get_aip_storage_locations writes to stdout is a JSON blob so we should use the json
decoder to deserialize it. The payload looks like the following, always hitting the Storage Service API to build the full list of locations:
{
"default": {"description": "Default Location", "uri": "/api/v2/location/default/AS/"},
"3191bf34-c803-4bdf-a37a-cf1aaf1364d9": {"description": "...", "uri": "..."}
}
This is done twice in the standard Archivematica workflow, i.e. for AIP (AS) and DIP (DS) store locations.