dd-trace-go icon indicating copy to clipboard operation
dd-trace-go copied to clipboard

Migrate JSON libraries to `encoding/json/v2`

Open darccio opened this issue 1 month ago • 2 comments

Discussed in https://github.com/DataDog/dd-trace-go/discussions/4187

Originally posted by darccio November 28, 2025

Package Name

No response

Package Version(s)

No response

Describe the feature you'd like

After working on #4176, we concluded that it'd be good to migrate from the following libraries to encoding/json/v2:

  • github.com/json-iterator/go
  • github.com/minio/simdjson-go

Is your feature request related to a problem?

Reduce our dependencies to the bare minimum.

Describe alternatives you've considered

No response

Additional context

No response

darccio avatar Nov 28 '25 15:11 darccio

After working on https://github.com/DataDog/dd-trace-go/pull/4176, we concluded that it'd be good to migrate from the following libraries to encoding/json/v2

Adding a bit more of context: We don't want to migrate from github.com/minio/simdjson-go because this is significantly faster than any other libraries but we need a fallback library because it does not support a lot of architectures and encoding/json is currently slower than github.com/json-iterator/go so we chose this one.

eliottness avatar Dec 01 '25 15:12 eliottness

Additional context: in order to migrate, the new library must support partial parsing.

darccio avatar Dec 09 '25 14:12 darccio