![]() |
JSON Parser
1.0
|
| boolean default_search_function_sloppy_array_double_value | ( | const void * | element, |
| const void * | key | ||
| ) |
This search function searches the elements of a specified JSON Array List looking for a match of element number (non-integer) value to the key value number.
It can be used on both JSON Object lists and Array lists. It will only attempt to find a match with elements that have the value_type of JSON_double. It will ignore any elements with a different value type.
This is one of 3 available default search functions for floating point numbers. This search function is the best choice for very low precision searches when the caller has poor confidence in the accuracy of the precision of the search elements and the key value. It enables search matches with a very high epsilon factor to be able find a broad match when precision has not been taken into consideration by the caller or the JSON data writer.
Unlike the general purpose search function default_search_function_array_values() these value type specific search functions use a simple non-structure key to perform the search, so using default_search_function_array_double_value() as your search function you could use list_simple_search(root_list, 42.45);