In order to evaluate the keep reasons for snapshots, there should be also the id's
to compare it with snapshots within the keep object. (See also Issue #3117)
In order to avoid output parameters also changed function addJSONSnapshots to asJSONSnapshots