How do I upload JSON to IPFS using ipfs-http-client in NextJS

I am able to upload files to IPFS using the ipfs-http-client and infura api in the Nextjs
as suggesting in this tutorial

but I am not able to upload the JSON using the same method and same API. I am also not able to find any documentation regarding that in the internet.