Deals with csv and json payload in a smarter way

Deals with csv and json payload in a smarter way and possible manipulation insertion time

Thanks to @paulread for pointing out the lack of csv support.