api: Add a more generic way of setting global defaults

also each resource can have it's own default_args field
export the value of json.null through the library