diff --git a/RedfishPkg/Library/JsonLib/JsonLib.c b/RedfishPkg/Library/JsonLib/JsonLib.c index 3693299afb..c305a3767f 100644 --- a/RedfishPkg/Library/JsonLib/JsonLib.c +++ b/RedfishPkg/Library/JsonLib/JsonLib.c @@ -430,10 +430,10 @@ JsonValueGetAsciiString ( IN EDKII_JSON_VALUE Json ) { - CHAR8 *AsciiStr; + CONST CHAR8 *AsciiStr; UINTN Index; - AsciiStr = (CHAR8 *) ((json_t *) Json); + AsciiStr = json_string_value ((json_t *) Json); if (AsciiStr == NULL) { return NULL; }