rt300@13: #ifndef CPPTL_JSON_FEATURES_H_INCLUDED rt300@13: # define CPPTL_JSON_FEATURES_H_INCLUDED rt300@13: rt300@13: # include "forwards.h" rt300@13: rt300@13: namespace Json { rt300@13: rt300@13: /** \brief Configuration passed to reader and writer. rt300@13: * This configuration object can be used to force the Reader or Writer rt300@13: * to behave in a standard conforming way. rt300@13: */ rt300@13: class JSON_API Features rt300@13: { rt300@13: public: rt300@13: /** \brief A configuration that allows all features and assumes all strings are UTF-8. rt300@13: * - C & C++ comments are allowed rt300@13: * - Root object can be any JSON value rt300@13: * - Assumes Value strings are encoded in UTF-8 rt300@13: */ rt300@13: static Features all(); rt300@13: rt300@13: /** \brief A configuration that is strictly compatible with the JSON specification. rt300@13: * - Comments are forbidden. rt300@13: * - Root object must be either an array or an object value. rt300@13: * - Assumes Value strings are encoded in UTF-8 rt300@13: */ rt300@13: static Features strictMode(); rt300@13: rt300@13: /** \brief Initialize the configuration like JsonConfig::allFeatures; rt300@13: */ rt300@13: Features(); rt300@13: rt300@13: /// \c true if comments are allowed. Default: \c true. rt300@13: bool allowComments_; rt300@13: rt300@13: /// \c true if root must be either an array or an object value. Default: \c false. rt300@13: bool strictRoot_; rt300@13: }; rt300@13: rt300@13: } // namespace Json rt300@13: rt300@13: #endif // CPPTL_JSON_FEATURES_H_INCLUDED