MCPcopy
hub / github.com/bitly/go-simplejson / String

Method String

simplejson.go:202–207  ·  view source on GitHub ↗

String type asserts to `string`

()

Source from the content-addressed store, hash-verified

200
201// String type asserts to `string`
202func (j *Json) String() (string, error) {
203 if s, ok := (j.data).(string); ok {
204 return s, nil
205 }
206 return "", errors.New("type assertion to string failed")
207}
208
209// Bytes type asserts to `[]byte`
210func (j *Json) Bytes() ([]byte, error) {

Callers 10

MustStringMethod · 0.95
TestSimplejsonFunction · 0.80
TestStdlibInterfacesFunction · 0.80
TestSetFunction · 0.80
TestReplaceFunction · 0.80
TestSetPathFunction · 0.80
TestSetPathNoPathFunction · 0.80
Uint64Method · 0.80

Calls

no outgoing calls

Tested by 8

TestSimplejsonFunction · 0.64
TestStdlibInterfacesFunction · 0.64
TestSetFunction · 0.64
TestReplaceFunction · 0.64
TestSetPathFunction · 0.64
TestSetPathNoPathFunction · 0.64