Please enable JavaScript
JSON.serialize() method can be used to create JSON String using Apex in Salesforce. Blog Post: https://www.infallibletechie.com/2014/11/how-to-create-json-string-using-apex-in.html