Command line arguments for JSON reports (--json
, --json-line
, --json-udp
).
More...
#include <tsjsonOutputArgs.h>
Command line arguments for JSON reports (--json
, --json-line
, --json-udp
).
◆ defineArgs()
void ts::json::OutputArgs::defineArgs |
( |
Args & |
args, |
|
|
bool |
use_short_opt, |
|
|
const UString & |
help = UString() |
|
) |
| |
Add command line option definitions in an Args.
- Parameters
-
[in,out] | args | Command line arguments to update. |
[in] | use_short_opt | Define 'j' as short option for --json . |
[in] | help | Help text for option --json . |
◆ loadArgs()
Load arguments from command line.
Args error indicator is set in case of incorrect arguments.
- Parameters
-
[in,out] | duck | TSDuck execution context. |
[in,out] | args | Command line arguments. |
- Returns
- True on success, false on error in argument line.
◆ useJSON()
bool ts::json::OutputArgs::useJSON |
( |
| ) |
const |
|
inline |
Check if any JSON output option is specified.
- Returns
- True if any JSON output option is specified.
◆ useFile()
bool ts::json::OutputArgs::useFile |
( |
| ) |
const |
|
inline |
Check if JSON file output option is specified.
- Returns
- True if JSON file output option is specified.
◆ report() [1/2]
bool ts::json::OutputArgs::report |
( |
const json::Value & |
root, |
|
|
std::ostream & |
stm, |
|
|
Report & |
rep |
|
) |
| |
Issue a JSON report according to options.
- Parameters
-
[in] | root | JSON root object. |
[in] | stm | Output stream when --json is specified. |
[in] | rep | Logger to report errors or output one-line JSON when --json-line is specified. |
- Returns
- True on success, false on error.
◆ report() [2/2]
Issue a JSON report according to options.
- Parameters
-
[in] | root | JSON root object. |
[in] | doc | Output running document when --json is specified. |
[in] | rep | Logger to report errors or output one-line JSON when --json-line is specified. |
- Returns
- True on success, false on error.
The documentation for this class was generated from the following file: