Page 1 of 1
Re: Application-defined exception on ICEFv8Value.GetKeys
Posted: Mon Jul 22, 2019 7:23 pm
by salvadordf
Hi,
Please, set a breakpoint at the Avalue.GetKeys(LKeys) line and click F7 (trace into) when the debugger reaches that line.
It should go to TCefv8ValueRef.GetKeys and possibly to TCefCustomStringList.CopyToStrings but there are some other CEF functions around there and it would be helpful to know the exact code line where the exception is raised.
Re: Application-defined exception on ICEFv8Value.GetKeys
Posted: Mon Jul 22, 2019 7:58 pm
by salvadordf
CEF have special functions to handle JSON strings :
- CefParseJson
- CefParseJsonAndReturnError
- CefWriteJson
These are the CEF code comments for those functions :
Code: Select all
///
// Parses the specified |json_string| and returns a dictionary or list
// representation. If JSON parsing fails this function returns NULL.
///
CEF_EXPORT struct _cef_value_t* cef_parse_json(
const cef_string_t* json_string,
cef_json_parser_options_t options);
///
// Parses the specified |json_string| and returns a dictionary or list
// representation. If JSON parsing fails this function returns NULL and
// populates |error_code_out| and |error_msg_out| with an error code and a
// formatted error message respectively.
///
CEF_EXPORT struct _cef_value_t* cef_parse_jsonand_return_error(
const cef_string_t* json_string,
cef_json_parser_options_t options,
cef_json_parser_error_t* error_code_out,
cef_string_t* error_msg_out);
///
// Generates a JSON string from the specified root |node| which should be a
// dictionary or list value. Returns an NULL string on failure. This function
// requires exclusive access to |node| including any underlying data.
///
// The resulting string must be freed by calling cef_string_userfree_free().
CEF_EXPORT cef_string_userfree_t
cef_write_json(struct _cef_value_t* node, cef_json_writer_options_t options);
Perhaps you need to use them at some point.
It would also be helpful If you have a small demo project that you can share to reproduce the exception.
Re: Application-defined exception on ICEFv8Value.GetKeys
Posted: Mon Jul 22, 2019 7:59 pm
by salvadordf
I saw your reply but I posted the second message anyway because it might be useful if you handle JSON strings
