transfer messages using json