MCPcopy Create free account
hub / github.com/stretchr/objx / MustFromJSON

Function MustFromJSON

map.go:86–92  ·  view source on GitHub ↗

****** Conversion Constructors MustFromJSON creates a new Map containing the data specified in the jsonString. Panics if the JSON is invalid.

(jsonString string)

Source from the content-addressed store, hash-verified

84//
85// Panics if the JSON is invalid.
86func MustFromJSON(jsonString string) Map {
87 o, err := FromJSON(jsonString)
88 if err != nil {
89 panic("objx: MustFromJSON failed with error: " + err.Error())
90 }
91 return o
92}
93
94// MustFromJSONSlice creates a new slice of Map containing the data specified in the
95// jsonString. Works with jsons with a top level array

Callers 10

TestFixturesFunction · 0.92
TestMapFromJSONFunction · 0.92
TestMapFromJSONWithErrorFunction · 0.92
TestSimpleExampleFunction · 0.92
TestMSISliceFunction · 0.92
TestIsMSISliceFunction · 0.92
TestObjxMapSliceFunction · 0.92
TestIsObjxMapSliceFunction · 0.92
TestAccessorsNestedFunction · 0.92
TestConversionJSONFunction · 0.92

Calls 2

FromJSONFunction · 0.85
ErrorMethod · 0.45

Tested by 10

TestFixturesFunction · 0.74
TestMapFromJSONFunction · 0.74
TestMapFromJSONWithErrorFunction · 0.74
TestSimpleExampleFunction · 0.74
TestMSISliceFunction · 0.74
TestIsMSISliceFunction · 0.74
TestObjxMapSliceFunction · 0.74
TestIsObjxMapSliceFunction · 0.74
TestAccessorsNestedFunction · 0.74
TestConversionJSONFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…