ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/cf.schmorp.de/dclient/include/json/features.h
Revision: 1.1
Committed: Sun Oct 17 08:14:53 2010 UTC (16 years ago) by sf-pippijn
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Log Message:
initial import

File Contents

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