def test_nested_json(self):
        """Test extraction of nested JSON objects."""
        response = '''
        {
            "reasoning": "Nested structure.",
            "answer": 42,
            "data": {"nested": {"key": "value"}}
        }
        '''
        expected = {
            "reasoning": "Nested structure.",
            "answer": 42,
            "data": {
                "nested": {"key": "value"}
            }
        }
        self.assertEqual(convert_response_to_json(response), expected)
Test extraction of nested JSON objects.
tests/test_json_parsing.py