The most complex parsing system is implemented in the website production pipeline on Elementor.
It works with several sources at once:
Elementor JSON templates;
Envato ZIP archives;
Gemini responses;
intermediate generation files.
Parsing Elementor JSON
Elementor stores pages as a deeply nested JSON tree.
I implemented a recursive traversal of this structure:
Elementor JSON
→ traversing dict and list
→ searching for widgets
→ analyzing settings
→ searching for text fields
→ filtering technical values
→ assigning ID node_N
→ forming a dictionary of texts
The parser supports:
standard Elementor widgets;
JegKit;
ElementsKit;
nested elements;
repeater fields;
HTML texts;
headings;
descriptions;
buttons;
reviews;
accordion;
tabs;
countdown;
other text fields.
A set of dozens of target keys is used, by which the system determines user text.
Integration with Gemini
Extracted texts are sent to Gemini.
After generation, the system:
receives a raw response;
removes markdown wrappers;
extracts JSON;
checks the structure;
matches responses by node_N;
re-traverses Elementor JSON;
returns each text to the original element;
saves a new valid JSON.
Full cycle:
Elementor JSON
→ text extraction
→ Gemini
→ AI response parsing
→ JSON validation
→ reverse substitution
→ new Elementor JSON
Parsing Envato ZIP
To prepare templates, I also implemented processing of Envato archives:
Envato ZIP
→ unpacking
→ traversing files
→ searching for Elementor JSON
→ checking structure
→ counting text elements
→ selecting suitable templates
→ transferring to golden templates
Additional verification
After the main generation, the template goes through several stages:
searching for suspicious texts;
re-generating with AI;
searching for Lorem Ipsum;
separate rewriting of Lorem;
cleaning remaining original lines;
replacing images;
preparing JSON for publication.
As a result, the Envato template automatically turns into a ready Elementor page with new content.
It works with several sources at once:
Elementor JSON templates;
Envato ZIP archives;
Gemini responses;
intermediate generation files.
Parsing Elementor JSON
Elementor stores pages as a deeply nested JSON tree.
I implemented a recursive traversal of this structure:
Elementor JSON
→ traversing dict and list
→ searching for widgets
→ analyzing settings
→ searching for text fields
→ filtering technical values
→ assigning ID node_N
→ forming a dictionary of texts
The parser supports:
standard Elementor widgets;
JegKit;
ElementsKit;
nested elements;
repeater fields;
HTML texts;
headings;
descriptions;
buttons;
reviews;
accordion;
tabs;
countdown;
other text fields.
A set of dozens of target keys is used, by which the system determines user text.
Integration with Gemini
Extracted texts are sent to Gemini.
After generation, the system:
receives a raw response;
removes markdown wrappers;
extracts JSON;
checks the structure;
matches responses by node_N;
re-traverses Elementor JSON;
returns each text to the original element;
saves a new valid JSON.
Full cycle:
Elementor JSON
→ text extraction
→ Gemini
→ AI response parsing
→ JSON validation
→ reverse substitution
→ new Elementor JSON
Parsing Envato ZIP
To prepare templates, I also implemented processing of Envato archives:
Envato ZIP
→ unpacking
→ traversing files
→ searching for Elementor JSON
→ checking structure
→ counting text elements
→ selecting suitable templates
→ transferring to golden templates
Additional verification
After the main generation, the template goes through several stages:
searching for suspicious texts;
re-generating with AI;
searching for Lorem Ipsum;
separate rewriting of Lorem;
cleaning remaining original lines;
replacing images;
preparing JSON for publication.
As a result, the Envato template automatically turns into a ready Elementor page with new content.