Repository navigation
Added
--report-allforjsonl_utf8_guard.py: keeps scanning past the first invalid line and prints one JSON summary,{"status": "invalid", "records": N, "errors": [{"line": L, "reason": "..."}], "truncated": false, "max_bytes": ...}, exit code2. At mostMAX_REPORTED_ERRORS(100) errors are listed and"truncated": truemarks a longer list;recordscounts valid objects across the whole file. An over-long line is still rejected before decoding and is drained in fixed-size chunks so later lines can be checked. The default single-error behavior, messages and exit codes are unchanged (#33).
Fixed
- Non-object JSONL records name their JSON type without including input values:
Line N: expected a JSON object, got an array(alsoa string,a number,true,false,null) (#47). --max-bytesis validated by argparse, so0and negative values are a usage error naming the argument (must be a positive integer, got 0, exit 2) instead of aValidation failed:line that read like bad input. The library check initer_jsonl_recordsis unchanged for direct callers; a non-number keeps argparse's own message (#41).- Rejections that already had their own cause now say so instead of the generic
invalid JSON: a repeated object key reportsLine N: duplicate JSON object key, andNaN/Infinity/-InfinityreportLine N: non-finite number (NaN or Infinity) is not allowed. Neither message includes the key or any record content; real parse errors keepinvalid JSON(#40).
Thanks to @rise11hx-cmyk and @jwalith4418-Mj for this release.