1BSON_AS_CANONICAL_EXTENDED_JSON(3)  Libbson BSON_AS_CANONICAL_EXTENDED_JSON(3)
2
3
4

NAME

6       bson_as_canonical_extended_json - bson_as_canonical_extended_json()
7

SYNOPSIS

9          char *
10          bson_as_canonical_extended_json (const bson_t *bson, size_t *length);
11

PARAMETERS

13       · bson: A bson_t.
14
15       · length: An optional location for the length of the resulting string.
16

DESCRIPTION

18       The bson_as_canonical_extended_json() encodes bson as a UTF-8 string in
19       the canonical MongoDB Extended JSON format.
20
21       The caller is responsible  for  freeing  the  resulting  UTF-8  encoded
22       string by calling bson_free() with the result.
23
24       If non-NULL, length will be set to the length of the result in bytes.
25

RETURNS

27       If  successful,  a  newly  allocated UTF-8 encoded string and length is
28       set.
29
30       Upon failure, NULL is returned.
31

EXAMPLE

33          char *str = bson_as_canonical_extended_json (doc, NULL);
34          printf ("%s\n", str);
35          bson_free (str);
36

AUTHOR

38       MongoDB, Inc
39
41       2017-present, MongoDB, Inc
42
43
44
45
461.15.2                           Nov 06, 2019BSON_AS_CANONICAL_EXTENDED_JSON(3)
Impressum