Live data from Hacker News

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

reco.ai

71–80 of 278 posts

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

#72
Huh, I just did basically the same thing. My requirements were not due to spending $300k/yr on parsing (lol), but I was amazed how far I got just asking the AI for progressively more functionality.

My use case is a bit different. I wanted JSONata as the query language to query Flatbuffers data (via schema introspection) in Rust, due to its terseness and expressiveness, which is a great combination for AI generated queries.

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

#73
post #44

The key point for me was not the rewrite in Go or even the use of AI, it was that they started with this architecture: > The reference implementation is JavaScript, whereas our pipeline is in Go. So for years we’ve been running a fleet of jsonata-js pods on Kubernetes - Node.js processes that our Go services call over RPC. That meant that for every event (and expression) we had to serialize, send over the network, ev…

Yeah, it's like those posts "we made it 5,000x faster by actually thinking about what the code is doing."

Exactly. Reddit did one last year like: “We migrated from python to golang and fixed a bunch of non-performant SQL queries. It was so fast, isn’t golang awesome?”

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

#77
Some background on one of the other two golang implementations mentioned in the comments.

Years ago I hired an Upwork contractor to port v1.5.3 to golang as best he could. He did a great job and it served us well, however it was far, far from perfect and it couldn't pass most of the JS test suite. The worst was that it had several recursion bugs that could segfault with bad expressions.

That was the now-deprecated implementation at

https://github.com/blues/jsonata-go

Early in 2025 I used Claude Code and Codex to do a proper, compliant port that passes the full set of tests and is safe. It was most certainly not a trivial task for AI, as many nuances of JSONata syntax derive from its JS roots.

Regardless, it was a great experience and here's the 2.0.6 AI port, along with a golang exerciser that lets you flip back and forth between the implementations. We did a seamless migration and it's been running beautifully in prod in Blues' Notehub for quite a while - as a core transformation capability used by customers in our JSON message pipeline.

https://github.com/jsonata-go/jsonata

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

#78

The key point for me was not the rewrite in Go or even the use of AI, it was that they started with this architecture: > The reference implementation is JavaScript, whereas our pipeline is in Go. So for years we’ve been running a fleet of jsonata-js pods on Kubernetes - Node.js processes that our Go services call over RPC. That meant that for every event (and expression) we had to serialize, send over the network, ev…

You aren’t accounting for managerial politics. A product manager won’t gamble on a large project to lower operating cost, when their bonus is based on customer acquisition metrics.

The original author said he built this on the weekend, so my assumption is that this was something engineers had advocated for before but were shut down because management wanted them elsewhere.

The use of ai agents allowed them to shrink the problem down to the point where it was small enough to fit in their free time and not interrupt their assigned work.

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

#79
post #7

As long as you are using JSON, you will be able to optimize. Did you know that you can pass numbers up to 2 billion in 4 constant bytes instead of as a string of 20 average dynamic bytes? Also, fun fact, you can cut your packets in half by not repeating the names of your variables in every packet, you can instead use a positional system where cardinality represents the type of the variable. And you can do all of this…

Like other commenters already said, there are numerous ways they could have avoided/reduced the $500k/yr cost pre LLM, including simply paying someone to do port the code.

So I don't see there is any point in the article.

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

#80

The key point for me was not the rewrite in Go or even the use of AI, it was that they started with this architecture: > The reference implementation is JavaScript, whereas our pipeline is in Go. So for years we’ve been running a fleet of jsonata-js pods on Kubernetes - Node.js processes that our Go services call over RPC. That meant that for every event (and expression) we had to serialize, send over the network, ev…

I've been refactoring stuff with a $20 ChatGPT account.
Post reply on HN