| 1 |
|
|
1 |
|
|
| 2 |
|
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
|
2 |
|
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
|
| 3 |
|
|
3 |
|
|
| 4 |
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
4 |
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
| 5 |
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
5 |
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
| 6 |
|
|
6 |
|
|
| 7 |
|
// Official repository: https://github.com/boostorg/json
|
7 |
|
// Official repository: https://github.com/boostorg/json
|
| 8 |
|
|
8 |
|
|
| 9 |
|
|
9 |
|
|
| 10 |
|
#ifndef BOOST_JSON_IMPL_KIND_IPP
|
10 |
|
#ifndef BOOST_JSON_IMPL_KIND_IPP
|
| 11 |
|
#define BOOST_JSON_IMPL_KIND_IPP
|
11 |
|
#define BOOST_JSON_IMPL_KIND_IPP
|
| 12 |
|
|
12 |
|
|
| 13 |
|
#include <boost/json/kind.hpp>
|
13 |
|
#include <boost/json/kind.hpp>
|
| 14 |
|
|
14 |
|
|
| 15 |
|
|
15 |
|
|
| 16 |
|
|
16 |
|
|
| 17 |
|
|
17 |
|
|
| 18 |
|
|
18 |
|
|
| 19 |
|
|
19 |
|
|
| 20 |
|
to_string(kind k) noexcept
|
20 |
|
to_string(kind k) noexcept
|
| 21 |
|
|
21 |
|
|
| 22 |
|
|
22 |
|
|
| 23 |
|
|
23 |
|
|
| 24 |
|
case kind::array: return "array";
|
24 |
|
case kind::array: return "array";
|
| 25 |
|
case kind::object: return "object";
|
25 |
|
case kind::object: return "object";
|
| 26 |
|
case kind::string: return "string";
|
26 |
|
case kind::string: return "string";
|
| 27 |
|
case kind::int64: return "int64";
|
27 |
|
case kind::int64: return "int64";
|
| 28 |
|
case kind::uint64: return "uint64";
|
28 |
|
case kind::uint64: return "uint64";
|
| 29 |
|
case kind::double_: return "double";
|
29 |
|
case kind::double_: return "double";
|
| 30 |
|
case kind::bool_: return "bool";
|
30 |
|
case kind::bool_: return "bool";
|
| 31 |
|
default: // satisfy warnings
|
31 |
|
default: // satisfy warnings
|
| 32 |
|
case kind::null: return "null";
|
32 |
|
case kind::null: return "null";
|
| 33 |
|
|
33 |
|
|
| 34 |
|
|
34 |
|
|
| 35 |
|
|
35 |
|
|
| 36 |
|
|
36 |
|
|
| 37 |
|
operator<<(std::ostream& os, kind k)
|
37 |
|
operator<<(std::ostream& os, kind k)
|
| 38 |
|
|
38 |
|
|
| 39 |
|
|
39 |
|
|
| 40 |
|
|
40 |
|
|
| 41 |
|
|
41 |
|
|
| 42 |
|
|
42 |
|
|
| 43 |
|
|
43 |
|
|
| 44 |
|
|
44 |
|
|
| 45 |
|
|
45 |
|
|
| 46 |
|
|
46 |
|
|