1BSON_NEW_FROM_JSON(3)               libbson              BSON_NEW_FROM_JSON(3)
2
3
4

NAME

6       bson_new_from_json - bson_new_from_json()
7

SYNOPSIS

9          bson_t *
10          bson_new_from_json (const uint8_t *data, ssize_t len, bson_error_t *error);
11

PARAMETERS

13data: A UTF-8 encoded string containing valid JSON.
14
15len: The length of data in bytes excluding a trailing \0 or -1 to de‐
16         termine the length with strlen().
17
18error: An optional location for a bson_error_t.
19

DESCRIPTION

21       The bson_new_from_json() function allocates and initialize a new bson_t
22       by  parsing the JSON found in data. Only a single JSON object may exist
23       in data or an error will be set and NULL returned.
24

ERRORS

26       Errors are propagated via the error parameter.
27

RETURNS

29       A newly allocated bson_t if successful, otherwise  NULL  and  error  is
30       set.
31

AUTHOR

33       MongoDB, Inc
34
36       2017-present, MongoDB, Inc
37
38
39
40
411.21.1                           Mar 02, 2022            BSON_NEW_FROM_JSON(3)
Impressum