safe_parse_json: Safe JSON Parser

View source: R/utils_json.R

safe_parse_jsonR Documentation

Safe JSON Parser

Description

Parses a JSON string, attempting to repair it using fix_json if the initial parse fails.

Usage

safe_parse_json(text)

Arguments

text

A JSON string.

Value

A parsed R object (list, vector, etc.) or NULL if parsing fails even after repair.

Examples

safe_parse_json('{"a": 1}')
safe_parse_json('{"a": 1,')

aisdk documentation built on May 29, 2026, 9:07 a.m.