Files
oikos/vendor/github.com/modelcontextprotocol/go-sdk/internal/json/json.go
dtoro febc153b7f
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled
ci / web (push) Has been cancelled
Desktop App / Build Linux (amd64) (push) Has been cancelled
Desktop App / Attach to Release (push) Has been cancelled
fix: add involves edge from task to agent:nomos at creation
Plus sync vendor directory for Docker build compatibility.
2026-08-11 22:03:12 +02:00

33 lines
640 B
Go

// Copyright 2025 The Go MCP SDK Authors. All rights reserved.
// Use of this source code is governed by the license
// that can be found in the LICENSE file.
// Package json provides internal JSON utilities.
package json
import (
"bytes"
"io"
"github.com/segmentio/encoding/json"
)
type Decoder struct {
dec *json.Decoder
}
func NewDecoder(r io.Reader) *Decoder {
dec := json.NewDecoder(r)
dec.DontMatchCaseInsensitiveStructFields()
return &Decoder{dec: dec}
}
func (d *Decoder) Decode(v any) error {
return d.dec.Decode(v)
}
func Unmarshal(data []byte, v any) error {
return NewDecoder(bytes.NewReader(data)).Decode(v)
}