github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/helper/plugin/json.go (about)

     1  package plugin
     2  
     3  import (
     4  	"bytes"
     5  	"encoding/json"
     6  )
     7  
     8  func unmarshalJSON(data []byte, v interface{}) error {
     9  	dec := json.NewDecoder(bytes.NewReader(data))
    10  	dec.UseNumber()
    11  	return dec.Decode(v)
    12  }