Right now, on the back-end I encode my results from their OCaml types into JSON using
Yojson, and convert them to strings using
Yojson.to_string. Then on the front-end I pass those strings them to jQuery’s
$.parseJSON() and then use the JSON it gives me. Is there a cleaner way to do this? I was hoping I could skip the serialization/deserialization step, but can’t figure out a way to do it.