(str string)
| 33 | } |
| 34 | |
| 35 | func StrToMap(str string) (map[string]interface{}, error) { |
| 36 | m := make(map[string]interface{}) |
| 37 | err := Unmarshal([]byte(str), &m) |
| 38 | if err != nil { |
| 39 | return nil, err |
| 40 | } |
| 41 | return m, nil |
| 42 | } |
| 43 | |
| 44 | func StrToJsonArray(str string) ([]interface{}, error) { |
| 45 | var js []interface{} |
no test coverage detected