DAW JSON Link
Loading...
Searching...
No Matches
daw_json_serialize_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
11#include "impl/version.h"
12
13namespace daw::json {
14 inline namespace DAW_JSON_VER {
15 namespace options {
19 inline namespace serialize_options {
25 enum class SerializationFormat : unsigned {
26 /* Output JSON without whitespace surrounding members and values */
27 Minified,
28 /* Output JSON with indentation and newlines */
29 Pretty
30 }; // 1bit
31
37 enum class IndentationType : unsigned {
38 /* Use tabs for indentation */
39 Tab,
40 /* Use 1 space for indentation */
41 Space1,
42 /* Use 2 spaces for indentation */
43 Space2,
44 /* Use 3 spaces for indentation */
45 Space3,
46 /* Use 4 spaces for indentation */
47 Space4,
48 /* Use 5 spaces for indentation */
49 Space5,
50 /* Use 8 spaces for indentation */
51 Space8,
52 /* Use 10 spaces for indentation */
53 Space10,
54 };
55
61 enum class RestrictedStringOutput : unsigned {
62 /* Do not impose any extra restrictions on string output during
63 serialization */
64 None,
66 ErrorInvalidUTF8,
67 /* Restrict all string member values and all member names to 7bits.
68 This will result in escaping all values >= 0x7F. This can affect
69 round trips where the name contains high bits set*/
70 OnlyAllow7bitsStrings
71 };
72
78 enum class NewLineDelimiter : unsigned { n, rn };
79
84 enum class OutputTrailingComma : unsigned { No, Yes };
85 } // namespace serialize_options
86 } // namespace options
87 } // namespace DAW_JSON_VER
88} // namespace daw::json
constexpr json_options_t serialize_options(Policies... policies)
Customization point traits.
#define DAW_JSON_VER
The version string used in namespace definitions. Must be a valid namespace name.
Definition version.h:20