new json sink function (requires rjson)