Renamed json_serialize to json_serialize_to_string (more consistent), additional comments, bugfixes.