Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
15747 anikendra 1
#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
2
# define CPPTL_JSON_FEATURES_H_INCLUDED
3
 
4
# include "forwards.h"
5
 
6
namespace Json {
7
 
8
   /** \brief Configuration passed to reader and writer.
9
    * This configuration object can be used to force the Reader or Writer
10
    * to behave in a standard conforming way.
11
    */
12
   class JSON_API Features
13
   {
14
   public:
15
      /** \brief A configuration that allows all features and assumes all strings are UTF-8.
16
       * - C & C++ comments are allowed
17
       * - Root object can be any JSON value
18
       * - Assumes Value strings are encoded in UTF-8
19
       */
20
      static Features all();
21
 
22
      /** \brief A configuration that is strictly compatible with the JSON specification.
23
       * - Comments are forbidden.
24
       * - Root object must be either an array or an object value.
25
       * - Assumes Value strings are encoded in UTF-8
26
       */
27
      static Features strictMode();
28
 
29
      /** \brief Initialize the configuration like JsonConfig::allFeatures;
30
       */
31
      Features();
32
 
33
      /// \c true if comments are allowed. Default: \c true.
34
      bool allowComments_;
35
 
36
      /// \c true if root must be either an array or an object value. Default: \c false.
37
      bool strictRoot_;
38
   };
39
 
40
} // namespace Json
41
 
42
#endif // CPPTL_JSON_FEATURES_H_INCLUDED