func CreateObject(key string, ptr interface{}) (*pb.Object, error) {
	data, err := json.Marshal(ptr)
	if err != nil {
		return nil, fmt.Errorf("unable to generate JSON object: %v", err)
	}
	var jsonData map[string]interface{}
	err = json.Unmarshal(data, &jsonData)
	if err != nil {
		return nil, err
	}
	return ObjectFromMap(key, jsonData)
}
CreateObject uses reflection to convert the data (usually a struct) into an Object.
package data
import (
	"encoding/json"
	"errors"
	"fmt"
	pb "rsprd.com/spread/pkg/spreadproto"
)