SequoiaDB
 All Classes Namespaces Files Functions Macros Pages
fromjson.hpp
Go to the documentation of this file.
1 /*******************************************************************************
2 
3  Copyright (C) 2011-Present SequoiaDB Ltd.
4 
5  Licensed under the Apache License, Version 2.0 (the "License");
6  you may not use this file except in compliance with the License.
7  You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16 
17  Source File Name = fromjson.hpp
18 
19  Descriptive Name =
20 
21  When/how to use:
22 
23  Dependencies: N/A
24 
25  Restrictions: N/A
26 
27  Change Activity:
28  defect Date Who Description
29  ====== =========== === ==============================================
30  12/1/2014 ly Initial Draft
31 
32  Last Changed =
33 
34 *******************************************************************************/
38 #ifndef FROMJSON_HPP__
39 #define FROMJSON_HPP__
40 #include "core.hpp"
41 #include "ossFeat.hpp"
42 #if defined (SDB_ENGINE) || defined (SDB_CLIENT)
43 #include "../bson/util/builder.h"
44 #include "../bson/util/optime.h"
45 #include "../bson/bsontypes.h"
46 #include "../bson/oid.h"
47 #include "../bson/bsonelement.h"
48 #include "../bson/bsonobj.h"
49 #include "../bson/bsonmisc.h"
50 #include "../bson/bsonobjbuilder.h"
51 #include "../bson/bsonobjiterator.h"
52 #include "../bson/bson-inl.h"
53 #include "../bson/ordering.h"
54 #include "../bson/stringdata.h"
55 #include "../bson/bson_db.h"
56 #else
57 #include "bson/bson.hpp"
58 #endif
59 
63 namespace bson
64 {
73  SDB_EXPORT INT32 fromjson ( const string &str, BSONObj &out,
74  BOOLEAN isBatch = TRUE ) ;
75 
84  SDB_EXPORT INT32 fromjson ( const CHAR *pStr, BSONObj &out,
85  BOOLEAN isBatch = TRUE ) ;
86 
87 }
88 #endif