Skip to content

Instantly share code, notes, and snippets.

@drahnreb
drahnreb / jwcc.py
Created November 22, 2024 08:07 — forked from nolanw/jwcc.py
Load JWCC: JSON With Commas and Comments
# Lil loading tool for JWCC: JSON With Commas and Comments.
# See docstrings for loads() and jwcc2json() for more info.
# Public domain.
import json
import re
_INTERESTING_B = re.compile(rb'''
\] # array end
| \} # object end
| (?<! \\)" # string start