func ExampleUnmarshalCmd() {
	data := []byte(`{"jsonrpc":"1.0","method":"getblock","params":["000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",false],"id":1}`)
	var request btcjson.Request
	if err := json.Unmarshal(data, &request); err != nil {
		fmt.Println(err)
		return
	}
	if request.ID == nil {
		fmt.Println("Unexpected notification")
		return
	}
	if request.Method != "getblock" {
		fmt.Println("Unexpected method")
		return
	}
	cmd, err := btcjson.UnmarshalCmd(&request)
	if err != nil {
		fmt.Println(err)
		return
	}
	gbCmd, ok := cmd.(*btcjson.GetBlockCmd)
	if !ok {
		fmt.Printf("Incorrect command type: %T\n", cmd)
		return
	}
	fmt.Println("Hash:", gbCmd.Hash)
	fmt.Println("Verbose:", *gbCmd.Verbose)
	fmt.Println("VerboseTx:", *gbCmd.VerboseTx)
}
This example demonstrates how to unmarshal a JSON-RPC request and then
unmarshal the concrete request into a concrete command.
package btcjson_test
import (
	"encoding/json"
	"fmt"
	"github.com/stevenroose/go-bitcoin-core-rpc/btcjson"
)
func ExampleMarshalCmd() {
	blockHash := "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"
	gbCmd := btcjson.NewGetBlockCmd(blockHash, btcjson.Bool(false), nil)
	id := 1
	marshalledBytes, err := btcjson.MarshalCmd(id, gbCmd)
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Printf("%s\n", marshalledBytes)
}