It's not a matter of marshal or unmarshal, it's what do I need to write to my writer in combination with my Jquery?
Right now I have this for Go
func serveJson(w http.ResponseWriter, r *http.Request, ps httprouter.Params){
j, _ := os.Open("adjs.json")
defer j.Close()
var obj respWords
json.NewDecoder(j).Decode(&obj)
js, _ := json.Marshal(obj)
w.Header().Set("Content-Type", "application/json")
w.Write(js)
}
and this is my jquery getting the json
<script type = "text/javascript">
function randomize() {
scene = {}
$.getJSON('adjs.json', function(scene){
console.log('encoding')
})
console.log(scene)
}
</script>