MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / parseJSONArray

Function parseJSONArray

setting/console_setting/validation.go:25–31  ·  view source on GitHub ↗
(jsonStr string, typeName string)

Source from the content-addressed store, hash-verified

23)
24
25func parseJSONArray(jsonStr string, typeName string) ([]map[string]interface{}, error) {
26 var list []map[string]interface{}
27 if err := json.Unmarshal([]byte(jsonStr), &list); err != nil {
28 return nil, fmt.Errorf("%s格式错误:%s", typeName, err.Error())
29 }
30 return list, nil
31}
32
33func validateURL(urlStr string, index int, itemType string) error {
34 if !urlRegex.MatchString(urlStr) {

Callers 4

validateApiInfoFunction · 0.85
validateAnnouncementsFunction · 0.85
validateFAQFunction · 0.85
validateUptimeKumaGroupsFunction · 0.85

Calls 1

ErrorMethod · 0.80

Tested by

no test coverage detected