snow/aid/type.go

16 lines
265 B
Go
Raw Normal View History

package aid
import "github.com/goccy/go-json"
type JSON map[string]interface{}
func JSONFromBytes(input []byte) JSON {
var output JSON
json.Unmarshal(input, &output)
return output
}
func (j *JSON) ToBytes() []byte {
json, _ := json.Marshal(j)
return json
}