Rework with json integration

Signed-off-by: Fredrik Hallberg <saccer92@gmail.com>