package main

import (
  "bytes"
  "encoding/json"
  "fmt"
  "log"
  "os"
)

type User struct {
  ID string `json:"id"`
  Name string `json:"name"`
  Email string `json:"email"`
  PhoneNumber string `json:"phoneNumber"`
}

func main() {
  b, err := os.ReadFile("user.json")
  if err != nil {
    log.Fatalf("Failed to read file: %v\n", err);
  }

  var u User
  json.NewDecoder(bytes.NewBuffer(b)).Decode(&u)

  fmt.Printf("%#v", u)
}
