JsonCpp project page | Classes | Namespace | JsonCpp home page

json_features.h
Go to the documentation of this file.
1// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
2// Distributed under MIT license, or public domain if desired and
3// recognized in your jurisdiction.
4// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5
6#ifndef JSON_FEATURES_H_INCLUDED
7#define JSON_FEATURES_H_INCLUDED
8
9#if !defined(JSON_IS_AMALGAMATION)
10#include "forwards.h"
11#endif // if !defined(JSON_IS_AMALGAMATION)
12
13#pragma pack(push)
14#pragma pack()
15
16 namespace Json {
17
22 class JSON_API Features {
23 public:
30 static Features all();
31
38 static Features strictMode();
39
42 Features();
43
45 bool allowComments_{true};
46
49 bool strictRoot_{false};
50
52 bool allowDroppedNullPlaceholders_{false};
53
55 bool allowNumericKeys_{false};
56};
57
58} // namespace Json
59
60#pragma pack(pop)
61
62#endif // JSON_FEATURES_H_INCLUDED
Json::Features::strictRoot_
bool strictRoot_
true if root must be either an array or an object value.
Definition json_features.h:49
Json::Features::allowComments_
bool allowComments_
true if comments are allowed. Default: true.
Definition json_features.h:45
Json::Features::allowDroppedNullPlaceholders_
bool allowDroppedNullPlaceholders_
true if dropped null placeholders are allowed. Default: false.
Definition json_features.h:52
Json::Features::all
static Features all()
A configuration that allows all features and assumes all strings are UTF-8.
Definition json_reader.cpp:67
Json::Features::Features
Features()
Initialize the configuration like JsonConfig::allFeatures;.
Json::Features::strictMode
static Features strictMode()
A configuration that is strictly compatible with the JSON specification.
Definition json_reader.cpp:69
Json::Features::allowNumericKeys_
bool allowNumericKeys_
true if numeric object key are allowed. Default: false.
Definition json_features.h:55
JSON_API
#define JSON_API
If defined, indicates that the source file is amalgamated to prevent private header inclusion.
Definition config.h:50
forwards.h
Json
JSON (JavaScript Object Notation).
Definition allocator.h:15