Get a JSON as Text
Converts a JSON object to a string representation.
Overview
This procedure converts a JSON object to its text (string) representation. The resulting string is a properly formatted JSON string that can be used for storage, transmission, or display purposes. Non-ASCII characters are preserved in the output (not escaped).
Input
json
json
The JSON object to be converted
Yes
N/A
Output
string
The string representation of the JSON object
Examples
1. Converting a simple JSON object to string
This example converts a JSON object to its string representation.
get the json
get the json as a string2. Converting a JSON with special characters
This example demonstrates converting a JSON object with special characters (quotes and percentages) to a string. The result would be: {"TermsCode": "38", "Description": "0.5% 10 NET 45"}
the term is "{\"TermsCode\": \"38\", \"Description\": \"0.5% 10 NET 45\"}"
get the term as a json
get the term as a string3. Converting an empty JSON to string
This example shows converting an empty JSON object to its string representation "{}".
create an empty json
use the above as the best json
the best json
get the best json as a string4. Converting a complex JSON structure
This example demonstrates working with a nested JSON structure with multiple levels that can be converted to a string.
the AddressInformation is '{"BillingAddress": {"Name": "Brown Integrated Logistics"}}'
get the AddressInformation as a jsonLast updated
Was this helpful?
