mirror of
https://github.com/hanzoai/traces.git
synced 2026-10-30 18:20:41 +00:00
* Bump go.opentelemetry.io/collector/processor from 0.89.0 to 0.94.1 Bumps [go.opentelemetry.io/collector/processor](https://github.com/open-telemetry/opentelemetry-collector) from 0.89.0 to 0.94.1. - [Release notes](https://github.com/open-telemetry/opentelemetry-collector/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG-API.md) - [Commits](https://github.com/open-telemetry/opentelemetry-collector/compare/v0.89.0...v0.94.1) --- updated-dependencies: - dependency-name: go.opentelemetry.io/collector/processor dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Update serverless gomod * vendor update * Update serverless gomod * delete this file * add it back --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: grafanabot <[email protected]> Co-authored-by: Jennie Pham <[email protected]>
18 lines
403 B
Go
18 lines
403 B
Go
package json
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// Codec implements the encoding.Encoder and encoding.Decoder interfaces for JSON encoding.
|
|
type Codec struct{}
|
|
|
|
func (Codec) Encode(v map[string]any) ([]byte, error) {
|
|
// TODO: expose prefix and indent in the Codec as setting?
|
|
return json.MarshalIndent(v, "", " ")
|
|
}
|
|
|
|
func (Codec) Decode(b []byte, v map[string]any) error {
|
|
return json.Unmarshal(b, &v)
|
|
}
|