//go:build ignore package main import ( "encoding/json" "fmt" "os" ) func main() { b, e := os.ReadFile("send_fixture.json") if e != nil { panic(e) } var v struct { ReplySource string `json:"reply_source"` Result struct { Result struct { TXID string `json:"txid"` Requested int64 `json:"requested_sat"` Recipient int64 `json:"recipient_sat"` } `json:"result"` } `json:"result"` } if e = json.Unmarshal(b, &v); e != nil { panic(e) } fmt.Printf("reply_source=%s requested=%d recipient=%d txid=%s\n", v.ReplySource, v.Result.Result.Requested, v.Result.Result.Recipient, v.Result.Result.TXID) }