Unlocking an additional layer of safety to your iPhone is less difficult than you might suppose. With Two-Factor Time-Based One-Time Password (TOTP) authentication, you may bolster your device's protection and other website safety without relying on 1/3-party apps. Here's how you could set it up:
Sometime we need SOQL query result in JSON format and JSON.serialize help us to get result in JSON format. Below is syntax.
string query='SELECT id, name from account';
string Outputget=
JSON.serialize(database.query(query));
system.debug(Outputget);
The above syntax gives us following result:-
[
{
"attributes":{
"type":"Account",
"url":"/services/data/v48.0/sobjects/Account/your account ID"
},
"Id":"your account ID",
"Name":"Test Account Name"
}
]