@@ -0,0 +1,1106 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public%0A * License, v. 2.0. If a copy of the MPL was not distributed with this%0A * file, You can obtain one at http://mozilla.org/MPL/2.0/. */%0A%0A/**%0A *%0A */%0Apackage org.mozilla.javascript.tests;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport org.junit.Test;%0Aimport org.mozilla.javascript.Context;%0Aimport org.mozilla.javascript.Scriptable;%0A%0A/**%0A * @author Ronald Brill%0A */%0Apublic class NativeJsonTest %7B%0A%0A    @Test%0A    public void stringifyResultAndResultType() %7B%0A        String jsScript = %22function f()%7B return JSON.stringify(%7Bproperty1:%5C%22hello%5C%22, array1:%5B%7Bsubobject:1%7D%5D%7D); %7D f();%22;%0A        Context jsContext = Context.enter();%0A        try %7B%0A            Scriptable jsScope= jsContext.initStandardObjects();%0A            Object result = jsContext.evaluateString(jsScope, jsScript, %22myscript.js%22, 1, null);%0A            assertEquals(%22%7B%5C%22property1%5C%22:%5C%22hello%5C%22,%5C%22array1%5C%22:%5B%7B%5C%22subobject%5C%22:1%7D%5D%7D%22, result);%0A            assertEquals(%22java.lang.String%22, result.getClass().getName());%0A        %7D finally %7B%0A            Context.exit();%0A        %7D%0A    %7D%0A %7D%0A

add (modified) test case from #135