diff --git a/cmd/hook/main.go b/cmd/hook/main.go index e0568e7..e97529b 100644 --- a/cmd/hook/main.go +++ b/cmd/hook/main.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "net/url" + "encoding/json" ) type GetNotesOptions struct { @@ -33,12 +34,18 @@ Def( return } fmt.Printf("unescapeBody: %q\n", unesc) - values, err := url.ParseQuery(string(body)) + mp := map[string] any{} + err = bond.ParseStr(unesc, mp) if err != nil { fmt.Printf("err:%s\n", err) return } - fmt.Printf("Values: %q\n", values) + js, err := json.MarshalIndent(mp, "", "\t") + if err != nil { + fmt.Printf("err:%s\n", err) + return + } + fmt.Printf("\nparsed: %v\n", string(js)) c.SetStatus(statuses.OK) }), //),