Update events.js

replace msgpack with json