func (h Byteable) JSONObject() JSONObject {
	jo, _ := h.JSONObjectOk()
	return jo
}
JSONObject attempts to de-serailize the contained structure as a JSON Object (map)
Will fail if the type is array, string, bool, number etc.
package fftypes
import (
	"context"
	"crypto/sha256"
	"encoding/json"
	"github.com/hyperledger/firefly/internal/i18n"
	"github.com/hyperledger/firefly/internal/log"
)
const (
	nullString = "null"
)
type Byteable []byte
func (h *Byteable) UnmarshalJSON(b []byte) error {
	var flattener json.RawMessage
	err := json.Unmarshal(b, &flattener)
	if err != nil {
		return err
	}
	*h, err = json.Marshal(flattener)
	return err
}
func (h Byteable) MarshalJSON() ([]byte, error) {
	if h == nil {
		return []byte(nullString), nil
	}
	return h, nil
}
func (h Byteable) Hash() *Bytes32 {
	var b32 Bytes32 = sha256.Sum256([]byte(h))
	return &b32
}
func (h Byteable) String() string {
	b, _ := h.MarshalJSON()
	return string(b)
}
func (h Byteable) JSONObjectOk() (JSONObject, bool) {
	var jo JSONObject
	err := json.Unmarshal(h, &jo)
	if err != nil {
		log.L(context.Background()).Warnf("Unable to deserialize as JSON object: %s", string(h))
		jo = JSONObject{}
	}
	return jo, err == nil
}