package main
import (
"fmt"
"github.com/julienschmidt/httprouter"
"net/http"
"log"
)
func Index(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
fmt.Fprint(w, "Welcome!\n")
}
func Hello(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
fmt.Fprintf(w, "hello, %s!\n", ps.ByName("name"))
}
func main() {
router := httprouter.New()
router.GET("/", Index)
router.GET("/hello/:name", Hello)
log.Fatal(http.ListenAndServe(":8080", router))
}
{
"properties_1": {
"key_1": "value 1",
"key_2": "value 2",
"key_3": "value 3",
"key_4": "value 4",
"key_5": "value 5"
},
"properties_2": {
"key_1": "value 1",
"key_2": 1000,
"key_3": 47.595,
"key_4": "7006"
},
"ProductID": "7575",
"DateTime": "2000-01-01 00:00:00"
}