Fields
Options
Configure the JSON serialization output with one or more of the following options:| Option | Description |
|---|---|
| Pretty print | Format the output with indentation and line breaks. |
| Unescape slashes | Do not escape forward slashes in the output. |
Sample data
| Input | Output |
|---|---|
| {“name”: “Example”,“price”: 19.95} | ”{\“name\”:\“Example\”,\“price\“:19.95}” |
| {“invoiceId”: “#1234”,“totalAmount”: 300,“products”: [{“sku”: “ABC”,“price”: 100,“qty”: 1},{“sku”: “123”,“price”: 200,“qty”: 1}]} | ”{\“invoiceId\”:\“#1234\”,\“totalAmount\“:300,\“products\”:[{\“sku\”:\“ABC\”,\“price\“:100,\“qty\“:1},{\“sku\”:\“123\”,\“price\“:200,\“qty\“:1}]}” |
| [“A”, “B”, “C”] | ”[\“A\”,\“B\”,\“C\”]“ |
Pretty print
| Input | Output |
|---|---|
| {“name”: “Example”,“price”: 19.95} | ”{\n \“name\”: \“Example\”,\n \“price\”: 19.95\n}“ |
Unescape slashes
| Input | Output |
|---|---|
| {“url”: “https://example.com”\} | ”{\“url\”:\“https://www.example.org\\”\}” |