api/util: split out JSON functionality into api/util/json
api/util/json: enable multiple util.JSONAPIFunc to be chained in order, until one writes data