This function extracts JSON blocks from a string and parses them using `jsonlite::fromJSON()`. This can be used to extract all JSONs from LLM responses, immediately converting them to R objects.
extract_json(llm_response)A list of parsed JSON objects
A character string
CRITICAL FIX: Now uses simplifyVector = FALSE to preserve array structure. This ensures that JSON arrays remain as R lists, preventing single-element arrays from being simplified to character vectors. This is essential for proper schema validation when used with auto_unbox = TRUE in toJSON().