adding support for receiving json objects from js calls