Problem 1 to Fix 1
Oxygen JSON was corrupted before AI even saw it.
Oxygen stores component data as JSON in ct_builder_json postmeta. In practice, this JSON is
frequently corrupted: UTF-8 BOM bytes at the start that break json_decode, double or triple
wp_slash escaping from WordPress serialization, and bare Unicode sequences missing their backslash prefix.
AI tools would extract this data, try to parse it, and fail silently.
-
What the user experienced
Content extraction returned empty results or malformed JSON. AI could not read or modify Oxygen pages reliably.
-
Why it happened
WordPress
wp_slashescaping compounds on each save. Migration tools add BOM bytes. Database transfers corrupt Unicode. The raw JSON in postmeta is rarely clean. -
What shipped
A multi-stage repair pipeline: BOM stripping, up to 3
wp_unslashpasses, Unicode escape repair. On successful decode, the pipeline self-heals by rewriting canonical JSON back to the database. -
Benefit
Content extraction works on every Oxygen installation, regardless of how many times the database has been migrated, exported, or re-imported. Corrupted JSON is fixed permanently on first read.
Extraction behavior comparison
Extracting content from an Oxygen page with corrupted JSON
JSON has BOM + double-escaped slashes
Returns null — extraction reports empty page
Page appears empty to AI. No error message, no guidance on what went wrong.
BOM stripped, 2x unslash, Unicode fixed
Canonical JSON saved back — next read is instant
Full component tree extracted. Database permanently fixed. No user intervention required.
ct_builder_json postmeta, so subsequent reads are instant.