JsonCpp project page | Classes | Namespace | JsonCpp home page

json_features.h
Go to the documentation of this file.
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
// Distributed under MIT license, or public domain if desired and
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
#ifndef JSON_FEATURES_H_INCLUDED
#define JSON_FEATURES_H_INCLUDED
#if !defined(JSON_IS_AMALGAMATION)
#include "forwards.h"
#endif // if !defined(JSON_IS_AMALGAMATION)
#pragma pack(push)
#pragma pack()
namespace Json {
class JSON_API Features {
public:
static Features all();
static Features strictMode();
Features();
bool allowComments_{true};
bool strictRoot_{false};
bool allowDroppedNullPlaceholders_{false};
bool allowNumericKeys_{false};
};
} // namespace Json
#pragma pack(pop)
#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:57
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:59
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:16