(jsonStr string, formatErrorKey string)
| 24 | ) |
| 25 | |
| 26 | func parseJSONArray(jsonStr string, formatErrorKey string) ([]map[string]any, error) { |
| 27 | var list []map[string]any |
| 28 | if err := common.UnmarshalJsonStr(jsonStr, &list); err != nil { |
| 29 | return nil, common.NewMessage(formatErrorKey, map[string]any{"error": err.Error()}) |
| 30 | } |
| 31 | return list, nil |
| 32 | } |
| 33 | |
| 34 | func exceedsMaxCharacters(s string, max int) bool { |
| 35 | return len(utf16.Encode([]rune(s))) > max |
no test coverage detected