nfx-serialization 0.3.0
Cross-platform C++ JSON serialization library with extensible trait capabilities
Loading...
Searching...
No Matches
Types.h
Go to the documentation of this file.
1/*
2 * MIT License
3 *
4 * Copyright (c) 2025 nfx
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24
32
33#pragma once
34
35#include <string_view>
36
37namespace nfx::serialization::json::types
38{
39 //=====================================================================
40 // JSON Schema type constants
41 //=====================================================================
42
44 inline constexpr std::string_view STRING{ "string" };
45
47 inline constexpr std::string_view NUMBER{ "number" };
48
50 inline constexpr std::string_view INTEGER{ "integer" };
51
53 inline constexpr std::string_view OBJECT{ "object" };
54
56 inline constexpr std::string_view ARRAY{ "array" };
57
59 inline constexpr std::string_view BOOLEAN{ "boolean" };
60
62 inline constexpr std::string_view NULL_TYPE{ "null" };
63} // namespace nfx::serialization::json::types
constexpr std::string_view ARRAY
JSON array type.
Definition Types.h:56
constexpr std::string_view STRING
JSON string type.
Definition Types.h:44
constexpr std::string_view OBJECT
JSON object type.
Definition Types.h:53
constexpr std::string_view NULL_TYPE
JSON null type.
Definition Types.h:62
constexpr std::string_view NUMBER
JSON number type (includes integers).
Definition Types.h:47
constexpr std::string_view INTEGER
JSON integer type (subset of number).
Definition Types.h:50
constexpr std::string_view BOOLEAN
JSON boolean type.
Definition Types.h:59