We rewrote JSONata with AI in a day, saved $500k/year

Architecture and Original Cost

  • Many are stunned a JSON expression engine reached ~$300k/year in compute for RPC calls to Node pods from Go services.
  • Several argue this indicates a severely suboptimal architecture (microservice overkill, k8s overhead, network hops, serialization) rather than JSON being inherently expensive.
  • Others note that at “tens of billions of events/day” and large-enterprise customers, such cloud spend is plausible, especially with autoscaling fleets.

AI Rewrite vs. Plain Old Engineering

  • Commenters stress that the main win came from in-process evaluation in Go, not from AI itself.
  • Multiple people say a competent engineer could have hand-ported ~10k LOC of JS in days; AI mainly reduced the human time barrier.
  • Some see this as strong evidence that LLMs now make language/platform migrations and “vendor replacement” much cheaper.

Existing Go Implementations and Due Diligence

  • Several point out there were already Go ports of JSONata.
  • Counterpoints: those ports were old, incomplete, 1.x-only, poorly maintained, or failed the official test suite and real-world expressions.
  • Some wish the team had improved existing ports instead of creating yet another implementation.

Testing, Correctness, and Long‑Term Maintenance

  • Discussion highlights that success depends heavily on a comprehensive test suite the AI is not allowed to edit.
  • Concerns: AI-generated code may introduce subtle bugs, and AI is prone to “fixing” tests to match incorrect behavior or writing tests that just mirror implementation.
  • Questions are raised about who owns and maintains the new 13k LOC Go code and how future JSONata spec changes will be handled.

Cloud Costs, Org Culture, and Incentives

  • Several see this as a textbook case of “normalization of deviance”: a stopgap microservice became core infra and was scaled instead of fixed.
  • Management focus on features and growth, plus cheap/abstracted cloud infra, encouraged paying for more pods rather than funding a rewrite.
  • Some note that AI reframed this as an “AI project,” making it politically easier to prioritize technical debt payoff.

Broader Reflections on AI Coding

  • Optimists view this as a preview of AI clearing massive legacy/technical debt.
  • Skeptics warn of “vibe-coded” systems: rapid rewrites with shallow understanding, spawning new bugs and complexity cycles.