JsonRemedy.Utils.MultipleJsonDetector (JsonRemedy v0.1.11)
View SourceUtility for detecting and parsing multiple consecutive JSON values.
Handles Pattern 1 from json_repair Python library:
Multiple complete JSON values like []{} → [[], {}]
This must run BEFORE the layer pipeline because:
- Layer 1 might remove trailing JSON as "wrapper text"
- Layer 3 adds commas between
]{which breaks parsing
Based on json_repair Python library (json_parser.py:78-99)
Summary
Functions
Parse JSON string that may contain multiple consecutive values. Returns {:ok, parsed_value} or {:error, reason}
Parse first complete JSON value and return remaining string. Returns {:ok, parsed, remaining} or {:error, reason}
Functions
Parse JSON string that may contain multiple consecutive values. Returns {:ok, parsed_value} or {:error, reason}
If multiple values found, returns them in an array. If single value found, returns it unwrapped.
Parse first complete JSON value and return remaining string. Returns {:ok, parsed, remaining} or {:error, reason}