Globant's frontend teams pass nested configuration objects to design-system components. Implement infer_type_properties(obj) to recursively infer a normalized schema for a JSON-like object.
Return a descriptor with type and, when applicable, additional fields:
{"type": "string"}, {"type": "number"}, {"type": "boolean"}, or {"type": "null"}.{"type": "object", "properties": {...}}, where each property maps to its own descriptor.{"type": "array", "items": descriptor}. Infer the item descriptor by merging all element descriptors.{"type": "array", "items": {"type": "unknown"}}.{"type": "mixed"}. Arrays containing objects should merge their property keys recursively.def infer_type_properties(obj):