Ali, your example has several problems.
First, you do this:
var p Person
data, err := json.Marshal(p); if err != nil{
fmt.Println("Error", err)
}
What this does is encode an empty object, that's fine.
Next, you read the HTTP body from the request, and try to unmarshal that.
fmt.Println("Data",
[image: Capture.JPG]
Data : TYPE OF Json
var member Member // struct where json
data, err :=json.Marshall(member); if err != nil{ fmt.Printf("Error %s",err
)}
fmt.Printf("Data", data)
err = json.NewDecoder(request.Body).Decode(&member); if err != nil {fmt.
Printf("Error %s",err) // this is