Scroll to navigation

BSON_UTF8_ESCAPE_FOR_JSON(3) Library Functions Manual BSON_UTF8_ESCAPE_FOR_JSON(3)

NAME

bson_utf8_escape_for_json() - Escapes the string utf8 to be placed inside of a JSON string.

SYNOPSIS


char * bson_utf8_escape_for_json (const char *utf8, ssize_t utf8_len);

PARAMETERS

utf8
A UTF‐8 encoded string.
utf8_len
The length of utf8 in bytes or ‐1 if it is NULL terminated.

DESCRIPTION

Escapes the string utf8 to be placed inside of a JSON string.

RETURNS

A newly allocated string that should be freed with bson_free(3)

COLOPHON

This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.
2016‐10‐12 libbson