SequoiaDB
 All Classes Namespaces Files Functions Macros Pages
fromjson.hpp
Go to the documentation of this file.
1 /*******************************************************************************
2 
3  Copyright (C) 2011-2018 SequoiaDB Ltd.
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Affero General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  Source File Name = fromjson.hpp
19 
20  Descriptive Name =
21 
22  When/how to use:
23 
24  Dependencies: N/A
25 
26  Restrictions: N/A
27 
28  Change Activity:
29  defect Date Who Description
30  ====== =========== === ==============================================
31  12/1/2014 ly Initial Draft
32 
33  Last Changed =
34 
35 *******************************************************************************/
36 
40 #ifndef FROMJSON_HPP__
41 #define FROMJSON_HPP__
42 #include "core.hpp"
43 #include "ossFeat.hpp"
44 #if defined (SDB_ENGINE) || defined (SDB_CLIENT)
45 #include "../bson/util/builder.h"
46 #include "../bson/util/optime.h"
47 #include "../bson/bsontypes.h"
48 #include "../bson/oid.h"
49 #include "../bson/bsonelement.h"
50 #include "../bson/bsonobj.h"
51 #include "../bson/bsonmisc.h"
52 #include "../bson/bsonobjbuilder.h"
53 #include "../bson/bsonobjiterator.h"
54 #include "../bson/bson-inl.h"
55 #include "../bson/ordering.h"
56 #include "../bson/stringdata.h"
57 #include "../bson/bson_db.h"
58 #else
59 #include "bson/bson.hpp"
60 #endif
61 
65 namespace bson
66 {
75  SDB_EXPORT INT32 fromjson ( const string &str, BSONObj &out,
76  BOOLEAN isBatch = TRUE ) ;
77 
86  SDB_EXPORT INT32 fromjson ( const CHAR *pStr, BSONObj &out,
87  BOOLEAN isBatch = TRUE ) ;
88 
89 }
90 #endif