'use strict';

function parse(json) {
    try {
        return JSON.parse(json);
    } catch (e) {
        return undefined;
    }
}

function stringify(object) {
    try {
        return JSON.stringify(object);
    } catch (e) {
        return "null";
    }
}

module.exports = {
    parse: parse,
    stringify: stringify,
};

@@ -158,32 +158,83 @@
 ct) %7B%0A    try %7B%0A
+        if (object === undefined) throw undefined;%0A
         return J

fix stringification of undefined