annotate json/features.h @ 15:d5758530a039 tip

oF0.84 Retina, and iPhone support
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Tue, 12 May 2015 15:48:52 +0100
parents 426d645d8e69
children
rev   line source
rt300@13 1 #ifndef CPPTL_JSON_FEATURES_H_INCLUDED
rt300@13 2 # define CPPTL_JSON_FEATURES_H_INCLUDED
rt300@13 3
rt300@13 4 # include "forwards.h"
rt300@13 5
rt300@13 6 namespace Json {
rt300@13 7
rt300@13 8 /** \brief Configuration passed to reader and writer.
rt300@13 9 * This configuration object can be used to force the Reader or Writer
rt300@13 10 * to behave in a standard conforming way.
rt300@13 11 */
rt300@13 12 class JSON_API Features
rt300@13 13 {
rt300@13 14 public:
rt300@13 15 /** \brief A configuration that allows all features and assumes all strings are UTF-8.
rt300@13 16 * - C & C++ comments are allowed
rt300@13 17 * - Root object can be any JSON value
rt300@13 18 * - Assumes Value strings are encoded in UTF-8
rt300@13 19 */
rt300@13 20 static Features all();
rt300@13 21
rt300@13 22 /** \brief A configuration that is strictly compatible with the JSON specification.
rt300@13 23 * - Comments are forbidden.
rt300@13 24 * - Root object must be either an array or an object value.
rt300@13 25 * - Assumes Value strings are encoded in UTF-8
rt300@13 26 */
rt300@13 27 static Features strictMode();
rt300@13 28
rt300@13 29 /** \brief Initialize the configuration like JsonConfig::allFeatures;
rt300@13 30 */
rt300@13 31 Features();
rt300@13 32
rt300@13 33 /// \c true if comments are allowed. Default: \c true.
rt300@13 34 bool allowComments_;
rt300@13 35
rt300@13 36 /// \c true if root must be either an array or an object value. Default: \c false.
rt300@13 37 bool strictRoot_;
rt300@13 38 };
rt300@13 39
rt300@13 40 } // namespace Json
rt300@13 41
rt300@13 42 #endif // CPPTL_JSON_FEATURES_H_INCLUDED