format data to JSON for serial communication

Signed-off-by: Ladislas de Toldi <ladislas@weareleka.com>