yfpy.utils.convert_strings_to_numeric_equivalents

convert_strings_to_numeric_equivalents(json_obj)[source]

Convert JSON strings with integer or float numeric representations to their respective integer or float values.

Parameters

json_obj (Any) – JSON object (typically a dictionary or list, but can also be a primitive).

Returns

The numeric representation of any JSON strings that can be represented as integers or floats, else the original JSON object.

Return type

int | float | Any