(jsonStr string)
| 27 | var escapeAssertionRegex = regexp.MustCompile(`([()\s|&,=!><+\-*/]|^)((r|p)[0-9]*)\.`) |
| 28 | |
| 29 | func JsonToMap(jsonStr string) (map[string]interface{}, error) { |
| 30 | result := make(map[string]interface{}) |
| 31 | err := json.Unmarshal([]byte(jsonStr), &result) |
| 32 | if err != nil { |
| 33 | return result, err |
| 34 | } |
| 35 | return result, nil |
| 36 | } |
| 37 | |
| 38 | // EscapeAssertion escapes the dots in the assertion, because the expression evaluation doesn't support such variable names. |
| 39 | func EscapeAssertion(s string) string { |
no outgoing calls
no test coverage detected
searching dependent graphs…