[add] JSON serialisation in main script