def c_metadata(api, args, verbose=False):
    """
Set or get metadata associated with an object::

    usage: cdstar metadata <URL> [<JSON>]

    <JSON>  Path to metadata in JSON, or JSON literal.
"""
    obj = api.get_object(args['<URL>'].split('/')[-1])
    if not set_metadata(args['<JSON>'], obj):
        return json.dumps(obj.metadata.read(), indent=4)
Set or get metadata associated with an object::

    usage: cdstar metadata <URL> [<JSON>]

    <JSON>  Path to metadata in JSON, or JSON literal.