Migrate to use json/v2
Eventually I'd like to see all use of the json package replaced by json/v2 and jsontext, as the new API is both more ergonomic and performant. That's a big undertaking though, so let's start where we should have most to gain. I'm thinking about things like streaming input and output JSON in the server, roundtrips, the JSON built-ins and so on.
We could either start implementing some things under the 1.27 build tag, or wait until we bump Go to 1.27 in our go.mod file. This isn't urgent. Mainly creating this as a reminder, and possibly a future "epic" for further subtasks.
[!IMPORTANT] External contributors will be welcome but these changes will require detailed issues and discussions before any work commences. Please do not point your LLM/agent/whatever at this, as it will be rejected
Source: open-policy-agent/opa