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