Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
json_document.h
Go to the documentation of this file.
1/*
2 *
3 * Copyright (c) Microsoft Corporation.
4 * All rights reserved.
5 *
6 * This code is licensed under the MIT License.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files(the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions :
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 */
26/**
27 * @brief A file containing the JsonDocument interface.
28 *
29 * @file json_document.h
30 */
31#ifndef API_MIP_JSON_DOCUMENT_H_
32#define API_MIP_JSON_DOCUMENT_H_
33
34#include <memory>
35#include <string>
36#include <vector>
37
38#include "mip/json_value.h"
39#include "mip/mip_namespace.h"
40
41MIP_NAMESPACE_BEGIN
42/**
43 * @brief JsonDocument abstraction class.
44 *
45 */
47public:
48 /**
49 * @brief Gets a pointer to the root node of the document.
50 * @return A pointer to the root node of the document.
51 */
52 virtual std::shared_ptr<JsonValue> Root() const = 0;
53 /**
54 * @brief Create an Object value to later be added as a child of this document.
55 * @return An Object value to later be added as a child of this document.
56 */
57 virtual std::shared_ptr<JsonValue> CreateObjectValue() = 0;
58 /**
59 * @brief Create an Array value to later be added as a child of this document.
60 * @return An Array value to later be added as a child of this document.
61 */
62 virtual std::shared_ptr<JsonValue> CreateArrayValue() = 0;
63 /** @cond DOXYGEN_HIDE */
64 virtual ~JsonDocument() {}
65
66protected:
67 JsonDocument() {}
68 /** @endcond */
69};
70
71MIP_NAMESPACE_END
72
73#endif // API_MIP_JSON_DOCUMENT_H_
JsonDocument abstraction class.
virtual std::shared_ptr< JsonValue > Root() const =0
Gets a pointer to the root node of the document.
virtual std::shared_ptr< JsonValue > CreateObjectValue()=0
Create an Object value to later be added as a child of this document.
virtual std::shared_ptr< JsonValue > CreateArrayValue()=0
Create an Array value to later be added as a child of this document.
A file containing the JsonValue interface.
MIP namespace macros.