DAW JSON Link
Loading...
Searching...
No Matches
daw_json_parse_options.h
Go to the documentation of this file.
1// Copyright (c) Darrell Wright
2//
3// Distributed under the Boost Software License, Version 1.0. (See accompanying
4// file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
5//
6// Official repository: https://github.com/beached/daw_json_link
7//
8
9#pragma once
10
12
13namespace daw::json {
14 inline namespace DAW_JSON_VER {
15 namespace options {
18 inline namespace parser_options {
26 enum class ExecModeTypes : unsigned {
28 default_mode,
30 compile_time,
33 runtime,
35 simd
36 }; // 2bits
37
45 enum class ZeroTerminatedString : unsigned {
48 no,
50 yes
51 }; // 1bit
52
53 enum class AllowStringMutation : unsigned {
55 no,
58 yes
59 }; // 1 bit
60
68 enum class PolicyCommentTypes : unsigned {
70 none,
72 cpp,
74 hash
75 }; // 2bits
76
82 enum class CheckedParseMode : unsigned { yes, no }; // 1bit
83
90 enum class MinifiedDocument : unsigned { no, yes }; // 1 bit
91
100 enum class AllowEscapedNames : unsigned { no, yes }; // 1bit
101
110 enum class IEEE754Precise : unsigned { no, yes }; // 1bit
111
118 enum class ForceFullNameCheck : unsigned { no, yes }; // 1bit
119
127 enum class UseExactMappingsByDefault : unsigned { no, yes }; // 1bit
128
135 enum class MustVerifyEndOfDataIsValid : unsigned { no, yes };
136
142 enum class ExpectLongNames : unsigned { no, yes };
143
151
152 enum class [[deprecated(
153 "This is not used" )]] TemporarilyMutateBuffer : unsigned {
154 no,
155 yes
156 }; // 1bit
157
164 enum class ExcludeSpecialEscapes : unsigned { no, yes }; // 1bit
165
173 enum class ArrayReserve : unsigned {
174 none,
175 elements_128,
176 elements_512,
177 elements_1024
178 }; // 4bits
179 } // namespace parser_options
180 } // namespace options
181 } // namespace DAW_JSON_VER
182} // namespace daw::json
ZeroTerminatedString
Input is a zero terminated string. If this cannot be detected, you can specify it here....
CheckedParseMode
Enable all structure, buffer, and type checking. The default is yes, but no still does some checking ...
ExcludeSpecialEscapes
Exclude characters under 0x20 that are not explicitly allowed.
ForceFullNameCheck
No longer has an effect, member names are always matched exactly. Kept so that existing code compiles...
PolicyCommentTypes
Allow comments in JSON. The supported modes are none, C++ style comments, and # hash style comments....
AllowEscapedNames
Allow the escape character '\' in names. This forces a slower parser and is generally not needed....
MinifiedDocument
When document is minified, it is assumed that there is no whitespace in the document....
TemporarilyMutateBuffer
When enabled, the parser can temporarily set a character to the desired token. This allows for safe s...
MustVerifyEndOfDataIsValid
Continue checking that the data is whitespace or empty after the end of top level object is parsed fr...
IEEE754Precise
Use precise IEEE754 parsing of real numbers. When yes, float and double are correctly rounded using E...
ArrayReserve
Elements to reserve up front for arrays parsed into std::vector when their size is not known....
ExecModeTypes
Allow for different optimizations. Currently only the compile_time path is fully supported....
UseExactMappingsByDefault
Set the default parser policy to require all JSON members in the parsed object be mapped....
string_writer grows its string with resize_and_overwrite, leaving the new bytes uninitialized,...
#define DAW_JSON_VER
The version string used in namespace definitions. Must be a valid namespace name.
Definition version.h:20