Generating a JSON tree in the CompanyHandler class