func Struct2JSON(iface interface{}, prettyPrint bool) []byte {
	var jsonBytes []byte
	if prettyPrint == true {
		jsonBytes, _ = json.MarshalIndent(iface, "", "    ")
	} else {
		jsonBytes, _ = json.Marshal(iface)
	}
	return jsonBytes
}
Struct2JSON generates a byte representation from a struct
package geocatalogo
import (
	"bytes"
	"encoding/json"
	"fmt"
	"html/template"
	"io/ioutil"
	"net/http"
)