Hello Nashorn team, I have a question regarding conversion java object to json using JSON.stringify. Is it possible? Here is my test method
@Test public void convertToJson() throws ScriptException, NoSuchMethodException { Person person = new Person(); person.setFirstName("Vik"); person.setLastName("Gamov"); person.setSsn("111-11-11"); Invocable invocable = (Invocable) engine; Object x = invocable.invokeMethod(engine.eval("JSON"), "stringify", person); System.out.println(x); } Prints null. Please advise. Thanks -- With Best Regards, Vik Gamov