Decoding JSON by Golang

Decoding JSON by Golang

func main() {
    data := `{
      "A_key1": {
        "B_key1": {
          "C_key": "value"
        }
      },
      "A_key2": {
        "B_key2": {
          "C_key": "value"
        }
      },
      "A_key3": {
        "B_key3": {
          "C_key": "value"
        }
      },
      "A_key4": {
        "B_key4": {
          "C_key": "value"
        }
      },
      "A_key5": {
        "B_key5": {
          "C_key": "value"
        }
      }
    }`
    var p interface{}
    json.NewDecoder(strings.NewReader(data)).Decode(&p)
    fmt.Println(p)
}

Go Playground

 Share!