/* Caller can do any changes to the returned string without any impact to the original JSON value, and caller needs to free the returned string using FreePool(). */
CHAR16* EFIAPI JsonValueGetUnicodeString(IN EDKII_JSON_VALUE Json)
/* Caller can do any changes to the returned string without any impact to the original JSON value, and caller needs to free the returned string using FreePool(). */
CHAR16* EFIAPI JsonValueGetUnicodeString(IN EDKII_JSON_VALUE Json)
{
  EFI_STATUS   Status;
  CONST CHAR8  *Utf8Str;
  CHAR16       *Ucs2Str;
  Ucs2Str = NULL;
  Utf8Str = json_string_value ((json_t *)Json);
  if (Utf8Str == NULL) {
    return NULL;
  }
  Status = UTF8StrToUCS2 ((CHAR8 *)Utf8Str, &Ucs2Str);
  if (EFI_ERROR (Status)) {
    return NULL;
  }
  return Ucs2Str;
}