I have a personal project that I’m working on that accepts structured JSON data POSTed from an html form (Jquery AJAX). Right now, if I want to expand what I’m handing off to the server, I have to not only change the HTML, but the Go struct that the JSON gets decoded into on the backend using “encoding/json.”
As a future goal, I want to be able to drop template files in a directory that is read on startup to produce the forms, but I obviously won’t be able to create new fields for the structs that way. I’m considering doing away with JSON altogether and just using plaintext key/values, but that feels sloppy. Any suggestions?