llm_json for repairing malformed JSON strings, particularly those generated by Large Language Modelsrepair_json_str() - Repair malformed JSON strings
repair_json_file() - Read and repair JSON from files
repair_json_raw() - Repair JSON from raw byte vectors
return_objects parameter to all repair functions
TRUE, returns R objects (lists, vectors) instead of JSON stringsrepair_json_str(), repair_json_file(), and repair_json_raw()Complete schema validation and type conversion system inspired by the structr package
Schema builder functions:
s_map() - Define JSON objects with named fieldss_integer() - Integer fields with optional defaultss_double() - Double/numeric fields with optional defaultss_string() - String fields with optional defaultss_logical() - Logical/boolean fields with optional defaultss_array() - Arrays with typed elementss_any() - Accept any JSON typeSchema features:
.optional = TRUE.default parameterreturn_objects = TRUE and return_objects = FALSESchema benefits: