From 8ea98e8586a2e256463e01e1b66007a637913ca6 Mon Sep 17 00:00:00 2001 From: surdeus Date: Wed, 10 Jan 2024 23:42:39 +0300 Subject: [PATCH] ... --- cmd/hook/main.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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) }), //),