Using JSON for complex parameter input to hammer CLI commands

Problem:
Many of the input parameters for hammer commands indicate in the help messages:
Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters

But I have not found any examples of how to provide JSON input for parameters.

Expected outcome:
Examples using JSON to provide complex input parameters.

Foreman and Proxy versions:
foreman-cli-1.22.0.32-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman-0.17.0.8-1.el7sat.noarch
Foreman and Proxy plugin versions:
tfm-rubygem-hammer_cli_foreman_remote_execution-0.1.0-3.el7sat.noarch
tfm-rubygem-hammer_cli_foreman-0.17.0.8-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_discovery-1.0.1-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3.3-5.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_virt_who_configure-0.0.4-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.6.4-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_admin-0.0.8-3.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_openscap-0.1.7-2.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.13-2.el7sat.noarch
tfm-rubygem-hammer_cli_katello-0.18.0.6-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_ansible-0.3.2-1.el7sat.noarch
tfm-rubygem-hammer_cli-0.17.1-2.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_templates-0.1.2-2.el7sat.noarch

Distribution and version:
RH Satellite 6.6

Other relevant data:

# hammer content-view create -h
Usage:
    hammer content-view create [OPTIONS]

Options:
 --auto-publish AUTO_PUBLISH             Enable/Disable auto publish of composite view
                                         One of true/false, yes/no, 1/0.
 --component-ids COMPONENT_IDS           List of component content view version ids for composite views
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --composite                             Create a composite content view
 --description DESCRIPTION               Description for the content view
 --label LABEL                           Content view label
 --name NAME                             Name of the content view
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID       Organization ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --repository-ids REPOSITORY_IDS         List of repository ids
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --solve-dependencies SOLVE_DEPENDENCIES Solve RPM dependencies by default on Content View publish, defaults to
                                         False
                                         One of true/false, yes/no, 1/0.
 -h, --help                              Print help

Hey vhaispdeaded,

You can set the values of the ‘–repository-ids’ option via JSON, but not use a JSON as a source file as we can use via API, like the following example.

hammer content-view create --name CV_Satellite --organization ACME --repository-ids ["2","30","55"]

Best Regards
rbertol

Thank you.

I think Red Hat documentation (and their version of hammer --help) may need to be corrected to not indicate JSON formatted input.