---
title: Formatting Strings
framework: applenews
role: article
role_heading: Article
path: applenews/formatting-strings
---

# Formatting Strings

Learn how to format strings to pass to the API client.

## Overview

Overview When using command-line utilities to pass a string to the API client, enclose the string in single quotation marks to treat the text literally. When you enclose a string in double quotation marks, you need to escape certain ASCII characters (for example, the $ character). This example uses single quotation marks: alert-body='Big Company is acquiring Smaller Company for $2.5 billion.' This example shows the result of using single quotation marks: "alertBody": "Big Company is acquiring Smaller Company for $2.5 billion." This example uses double quotation marks incorrectly: alert-body="Big Company is acquiring Smaller Company for $2.5 billion." This example shows the result of using double quotation marks incorrectly. A string in double quotation marks with the $ sign should include an escape character: "alertBody": "Big Company is acquiring Smaller Company for .5 billion." This example correctly uses double quotation marks with an escape character: alert-body="Big Company is acquiring Smaller Company for \$2.5 billion." This example shows the result of using double quotation marks with an escape character: "alertBody": "Big Company is acquiring Smaller Company for $2.5 billion."

## See Also

### Essentials

- [Getting Ready to Publish and Manage Your Articles](applenews/getting-ready-to-publish-and-manage-your-articles.md)
- [About the Apple News Security Model](applenews/about-the-apple-news-security-model.md)
- [About Apple News API Field Types](applenews/about-apple-news-api-field-types.md)
