yfpy.utils.unpack_data

unpack_data(json_obj, parent_class=None)[source]

Recursive function to parse, clean, and assign custom data types to retrieved Yahoo Fantasy Sports data.

Parameters:
  • json_obj (Any) – JSON object for parsing (can be a dictionary, list, or primitive).

  • parent_class (Type) – Parent class type used to extract custom subclass type options for casting.

Returns:

Recursively returns JSON objects until data is completely parsed, cleaned, and typed (where applicable).

Return type:

Any