I want to send and receive a javascript object through a POST request parameter. As a result, I need to find a solution to encode and decode it.
JSON.stringify()
won't work because my JS object may contain functions.
I am also trying to avoid the option of sending it as a file, as it would introduce extra complexities, like introducing module.exports
and require
on sending and receiving sides respectively.
Any possible solution for my problem?