This patch refacors on the command_manager class and related callers.
Introduces register_single_command() and register_multiple_commands() to
distinguish whether registering a single or multiple commands. The duplicate
command strings in the former register_command() are reduced to avoid
inconsistency.
Changes the output of some commands to JSON format to improve readability
by programs (e.g., Python scripts), and ease the coding style. (NOTE: Some
output JSON strings are compacted and some are not, the compacted ones are
typically simple and in one line. Including:
This patch refacors on the command_manager class and related callers.