Is there any difference between the JSON.parse() method and the .json() method?

In the exercises regarding making requests using the fetch() API, we return response.json() upon successful completion in a .then() block.

In the MDN Docs, it is said that the .json() method parses JSON into a JavaScript object (please correct me if I misunderstood). Therefore, why do we not just use JSON.parse()?

The .json() method returns a promise so it can be used with .then() or async/await syntax. That is not true for JSON.parse().

1 Like

Thank you very much! I didn’t quite get it from the docs, but from what you’ve said, I now see that it is exactly the same. Thank you for the clear explanation!