notifications

In case JSON is an object, it will inject an attribute that points to an array reference containing the notifications. If the JSON is an array, an object is appended with one attribute that points to an array reference containing the notifications. If the JSON is empty, an object will be created with one attribute that points to an array reference containing the notifications.

If the JSON is not of one of the descripted types, it's returned unaltered.

The name of the attribute can either be given on registration or by passing a parameter for key. The name defaults to notifications.