GET API in Salesforce
For creating GET API in Salesforce, It is needed to use @HTTPGet above the method definition. It is noted that GET API does not consist of a body, for sending any information data needs to be sent in Params.
Similarly for other methods, we have @HTTPPut, @HTTPPatch, etc.
Using JSON Class
JSON Class is mostly used in the case of converting JSON-type data into Apex-type data. It consists of various methods which are used to convert jsonString to Apex and Apex to jsonString.