added a method to send jsonobjects