.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "BSON_AS_RELAXED_EXTENDED_JSON" "3" "Feb 22, 2024" "1.26.0" "libbson" .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX char * bson_as_relaxed_extended_json (const bson_t *bson, size_t *length); .EE .UNINDENT .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBbson\fP: A \fI\%bson_t\fP\&. .IP \(bu 2 \fBlength\fP: An optional location for the length of the resulting string. .UNINDENT .SH DESCRIPTION .sp The \fI\%bson_as_relaxed_extended_json()\fP encodes \fBbson\fP as a UTF\-8 string in the relaxed \fI\%MongoDB Extended JSON format\fP\&. .sp The caller is responsible for freeing the resulting UTF\-8 encoded string by calling \fI\%bson_free()\fP with the result. .sp If non\-NULL, \fBlength\fP will be set to the length of the result in bytes. .SH RETURNS .sp If successful, a newly allocated UTF\-8 encoded string and \fBlength\fP is set. .sp Upon failure, NULL is returned. .SH EXAMPLE .INDENT 0.0 .INDENT 3.5 .sp .EX char *str = bson_as_relaxed_extended_json (doc, NULL); printf (\(dq%s\en\(dq, str); bson_free (str); .EE .UNINDENT .UNINDENT .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .