JSON stringify a JS object in swig