wraping outgoing message into json array