History log of /openbmc/phosphor-power/json_parser_utils.cpp (Results 1 – 3 of 3)
Revision Date Author Comments
# 8873f428 06-Nov-2025 Shawn McCarney <shawnmm@us.ibm.com>

json_parser_utils: Add parseUint16

Add new parseUint16() function to the json_parser_utils namespace. The
function parses a uint16_t value within a JSON element.

Tested:
* Ran automated test cases.

json_parser_utils: Add parseUint16

Add new parseUint16() function to the json_parser_utils namespace. The
function parses a uint16_t value within a JSON element.

Tested:
* Ran automated test cases.

Change-Id: Id7c7c63f7a944a1910818927c3c70cb579f07dbd
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>

show more ...


# f1845c06 04-Nov-2025 Shawn McCarney <shawnmm@us.ibm.com>

json_parser_utils: Add variable support

Enhance the json_parser_utils functions to support optional usage of
variables in JSON values.

Variables are specified using the syntax `${variable_name}`.

json_parser_utils: Add variable support

Enhance the json_parser_utils functions to support optional usage of
variables in JSON values.

Variables are specified using the syntax `${variable_name}`.

Variable values are specified in an optional new parameter to the
parsing functions. Parsing functions will replace the variable with the
corresponding variable value.

Example:
```
{
"inventory_path": "/xyz/openbmc_project/inventory/system/chassis${chassis_number}"
}
```

Tested:
* Ran automated test cases.

Change-Id: Ib8f5d9b27ccc96ca9d16eb9a044321233f81ba18
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>

show more ...


# 38f85004 31-Oct-2025 Shawn McCarney <shawnmm@us.ibm.com>

Create common json_parser_utils functions

Create a json_parser_utils namespace containing common functions for
parsing JSON.

Extract the common functions from the JSON parsing code in the
phosphor-

Create common json_parser_utils functions

Create a json_parser_utils namespace containing common functions for
parsing JSON.

Extract the common functions from the JSON parsing code in the
phosphor-regulators and phosphor-power-sequencer applications.
Both applications have some identical parsing functions.

Create a common ConfigFileParserError class. The phosphor-regulators and
phosphor-power-sequencer applications both have an identical version of
this exception class.

Extract the common test cases from the two applications and put them in
a common location as well.

Summary:
* Common JSON parsing functions in
phosphor-power-sequencer/src/config_file_parser.* and
phosphor-regulators/src/config_file_parser.* moved to
json_parser_utils.*
* Common test cases in
phosphor-power-sequencer/test/config_file_parser_tests.cpp and
phosphor-regulators/test/config_file_parser_tests.cpp moved to
test/json_parser_utils_tests.cpp
* phosphor-power-sequencer/src/config_file_parser_error.hpp and
phosphor-regulators/src/config_file_parser_error.hpp replaced with
config_file_parser_error.hpp
* phosphor-power-sequencer/test/config_file_parser_error_tests.cpp and
phosphor-regulators/test/config_file_parser_error_tests.cpp replaced
with test/config_file_parser_error_tests.cpp

Tested:
* Ran automated test cases.

Change-Id: I35074c5e42d9e89def41ba8e729fe11c54ed8d27
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>

show more ...