github.com/zerosnake0/jzon@v0.0.9-0.20230801092939-1b135cb83f7f/standard_like.go (about) 1 package jzon 2 3 import "io" 4 5 // UnmarshalFromReader behave like json.Unmarshal but with an io.Reader 6 func UnmarshalFromReader(r io.Reader, o interface{}) error { 7 return DefaultDecoderConfig.UnmarshalFromReader(r, o) 8 } 9 10 // UnmarshalFromString behave like json.Unmarshal but with a string 11 func UnmarshalFromString(s string, o interface{}) error { 12 return DefaultDecoderConfig.UnmarshalFromString(s, o) 13 }