JSON is NOT a programming language. It is something called a method of data serialisation, which means the data that we use is made so that it attains singularity with different types of circumstances. E.g.: The server is implemented in Python, the client uses JS. Both have native support for JSON, so they can work with the data without any further conversions.
The PUT method is usually never used in production, because the new data is overwritten with the previous data, i.e., if you try to update the cart, you may even invalidate the logged in user in the first place! Therefore, the PATCH method is used, which changes the data in-place without any overwriting.
Note:
JSON is NOT a programming language. It is something called a method of data serialisation, which means the data that we use is made so that it attains singularity with different types of circumstances. E.g.: The server is implemented in Python, the client uses JS. Both have native support for JSON, so they can work with the data without any further conversions.
The PUT method is usually never used in production, because the new data is overwritten with the previous data, i.e., if you try to update the cart, you may even invalidate the logged in user in the first place! Therefore, the PATCH method is used, which changes the data in-place without any overwriting.
Thanks for the info