Communication protocol with JSON