func (p *Producer) PublishJSON(topic string, v interface{}) error {
	body, err := json.Marshal(v)
	if err != nil {
		return err
	}
	return p.Publish(topic, body)
}
PublishJSON - sends message to nsq  topic in json format
package producer
import (
	"encoding/json"
	"log"
	"github.com/crackcomm/nsqueue/nsqlog"
	"github.com/nsqio/go-nsq"
)
type Producer struct {
	Logger   *log.Logger
	LogLevel nsq.LogLevel
	*nsq.Producer
}
func New() *Producer {
	return &Producer{
		Logger:   nsqlog.Logger,
		LogLevel: nsqlog.LogLevel,
	}
}
func (p *Producer) Connect(addr string) (err error) {
	return p.ConnectConfig(addr, nsq.NewConfig())
}
func (p *Producer) ConnectConfig(addr string, config *nsq.Config) (err error) {
	p.Producer, err = nsq.NewProducer(addr, config)
	p.Producer.SetLogger(p.Logger, p.LogLevel)
	return
}
func (p *Producer) PublishJSONAsync(topic string, v interface{}, doneChan chan *nsq.ProducerTransaction, args ...interface{}) error {
	body, err := json.Marshal(v)
	if err != nil {
		return err
	}
	return p.PublishAsync(topic, body, doneChan, args...)
}