Add json parsing class and update Main parser to write valid json