diff --git a/example/main.go b/example/main.go index 1dc3df1..03cf272 100644 --- a/example/main.go +++ b/example/main.go @@ -27,5 +27,5 @@ func anotherHelloWorld(c *ron.Context) { } func helloWorldJSON(c *ron.Context) { - c.JSON(200, map[string]string{"message": "hello world"}) + c.JSON(200, ron.D{"message": "hello world"}) } diff --git a/ron.go b/ron.go index a779631..a5281af 100644 --- a/ron.go +++ b/ron.go @@ -3,9 +3,12 @@ package ron import ( "context" "encoding/json" + "log/slog" "net/http" ) +type D map[string]interface{} + type Context struct { C context.Context W http.ResponseWriter