Usually I wouldn't approach it this way, but for the sake of a practice exercise, I am attempting to convert an object without relying on JSON.stringify(). Take a look at the object in question:
obj = {
num: 0,
string: "string",
func: function () {},
emptyString: '',
null: null,
undefined: undefined
};
The desired outcome should look like the following:
'{"num":0,"string":"This is a custom string","emptyString":"","null":null}'