Handling JSON parsing directly inside the main function