ANALYSIS

How One Engineer Used AI to Rewrite JSONata in Go and Save $500K Per Year

M megaone_admin Mar 27, 2026 2 min read
Engine Score 8/10 — Important

This story details a highly successful, rapid AI-driven code rewrite of JSONata, resulting in significant annual savings and demonstrating practical AI application. It offers high actionability for companies seeking to optimize codebases and improve efficiency with AI tools.

Editorial illustration for: How One Engineer Used AI to Rewrite JSONata in Go and Save $500K Per Year

SaaS security company Reco has published a case study describing how a single engineer used AI-assisted code generation to rewrite JSONata, a JSON query and transformation language, as a pure Go library in approximately seven hours. The effort consumed roughly $400 in AI token costs and ultimately delivered $500,000 in annual cloud compute savings.

The technical challenge stemmed from Reco’s policy engine, which evaluates JSONata expressions against billions of events flowing through its data pipeline. The original JavaScript-based implementation was costing the company approximately $300,000 per year in compute costs due to the overhead of running a Node.js runtime at scale. Combined with additional pipeline optimizations enabled by the rewrite, total savings reached $500,000 annually.

The approach used what has been termed “vibe porting” — leveraging JSONata’s existing comprehensive test suite as a behavioral specification, then using AI to generate a functionally equivalent Go implementation that passes all existing tests. The team then ran a week-long shadow deployment, executing both the original and new versions simultaneously to verify behavioral equivalence in production before cutting over.

The case study has generated significant discussion in the engineering community about the practical economics of AI-assisted code migration. Critics have noted that the $500,000 savings figure combines the language rewrite with broader pipeline optimizations, making it difficult to isolate the direct impact of the AI-generated code. Others have questioned whether the seven-hour timeline accounts for subsequent debugging and production hardening.

Regardless of the precise attribution, the case illustrates a growing pattern in production engineering: using AI not to write novel code but to translate well-specified, well-tested implementations from one language to another. When a comprehensive test suite already exists to validate correctness, AI code generation can dramatically compress what would otherwise be weeks of manual porting work. The approach is most applicable when the target language offers meaningful performance or cost advantages over the source, as Go does over JavaScript for CPU-bound data processing at scale.

Share

Enjoyed this story?

Get articles like this delivered daily. The Engine Room — free AI intelligence newsletter.

Join 500+ AI professionals · No spam · Unsubscribe anytime

M
MegaOne AI Editorial Team

MegaOne AI monitors 200+ sources daily to identify and score the most important AI developments. Our editorial team reviews 200+ sources with rigorous oversight to deliver accurate, scored coverage of the AI industry. Every story is fact-checked, linked to primary sources, and rated using our six-factor Engine Score methodology.

About Us Editorial Policy