JSON Voorhees
Killer JSON for C++
Loading...
Searching...
No Matches
kind.hpp
Go to the documentation of this file.
1/** \file jsonv/kind.hpp
2 *
3 * Copyright (c) 2019-2020 by Travis Gockel. All rights reserved.
4 *
5 * This program is free software: you can redistribute it and/or modify it under the terms of the Apache License
6 * as published by the Apache Software Foundation, either version 2 of the License, or (at your option) any later
7 * version.
8 *
9 * \author Travis Gockel (travis@gockelhut.com)
10**/
11#ifndef __JSONV_KIND_HPP_INCLUDED__
12#define __JSONV_KIND_HPP_INCLUDED__
13
14#include <jsonv/config.hpp>
15
16#include <iosfwd>
17#include <string>
18
19namespace jsonv
20{
21
22/** \ingroup Value
23 * \{
24**/
25
26/** Describes the \e kind of data a \c value holds. See \c value for more information.
27 *
28 * \see http://json.org/
29**/
30enum class kind : unsigned char
31{
32 null,
33 object,
34 array,
35 string,
36 integer,
37 decimal,
38 boolean,
39};
40
41/** Print out the name of the \c kind. **/
42JSONV_PUBLIC std::ostream& operator<<(std::ostream&, const kind&);
43
44/** Get the name of the \c kind. **/
45JSONV_PUBLIC std::string to_string(const kind&);
46
47/** \} **/
48
49}
50
51#endif/*__JSONV_KIND_HPP_INCLUDED__*/
An adapter for enumeration types.
Copyright (c) 2014-2020 by Travis Gockel.
#define JSONV_PUBLIC
This function or class is part of the public API for JSON Voorhees.
Definition config.hpp:102
kind
Describes the kind of data a value holds.
Definition kind.hpp:31
JSONV_PUBLIC value object()
Create an empty object.
JSONV_PUBLIC const value null
An instance with kind::null.
JSONV_PUBLIC value array()
Create an empty array value.