CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
json_node_converter.h
1#pragma once
2
3#include <system/object.h>
4#include <system/details/pointer_collection_helpers.h>
5#include <cstdint>
6
7#include "system/text/json/serialization/json_converter_of_t.h"
8#include "system/text/json/nodes/json_node.h"
9
10namespace System
11{
12template <typename> class Nullable;
13namespace Text
14{
15namespace Json
16{
17class JsonElement;
18class JsonSerializerOptions;
19namespace Nodes
20{
21class JsonNodeOptions;
22} // namespace Nodes
23namespace Serialization
24{
25template <typename> class JsonConverter;
26enum class JsonNumberHandling;
27} // namespace Serialization
28class Utf8JsonReader;
29class Utf8JsonWriter;
30} // namespace Json
31} // namespace Text
32class TypeInfo;
33} // namespace System
34
35namespace System {
36
37namespace Text {
38
39namespace Json {
40
41namespace Serialization {
42
43namespace Converters {
44
45class JsonNodeConverter final : public JsonConverter<System::SharedPtr<Nodes::JsonNode>>
46{
49
50 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
51 RTTI_INFO_DECL();
52
53public:
54
56
62 void SetTemplateWeakPtr(uint32_t argument) override;
63
64private:
65
66 static System::SharedPtr<JsonNodeConverter> pr_Instance;
67
68};
69
70} // namespace Converters
71} // namespace Serialization
72} // namespace Json
73} // namespace Text
74} // namespace System
Forward declaration.
Definition: nullable.h:75
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Definition: json_element.h:59
Definition: json_node_options.h:14
void Write(System::SharedPtr< Utf8JsonWriter > writer, System::SharedPtr< Nodes::JsonNode > value, System::SharedPtr< JsonSerializerOptions > options) override
static System::SharedPtr< Nodes::JsonNode > Create(JsonElement element, Nullable< Nodes::JsonNodeOptions > options)
static System::SharedPtr< JsonNodeConverter > get_Instance()
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
System::SharedPtr< Nodes::JsonNode > Read(Utf8JsonReader &reader, const System::TypeInfo &typeToConvert, System::SharedPtr< JsonSerializerOptions > options) override
static System::SharedPtr< Nodes::JsonNode > ReadAsJsonElement(Utf8JsonReader &reader, Nodes::JsonNodeOptions options)
static System::SharedPtr< Nodes::JsonNode > ReadAsJsonNode(Utf8JsonReader &reader, Nodes::JsonNodeOptions options)
Definition: json_converter_of_t.h:80
Definition: utf8_json_reader.h:78
Represents a particular type and provides information about it.
Definition: type_info.h:109
@ Text
Defines color adjustment information for text.
@ TypeInfo
Specifies that the member is a type.
JsonNumberHandling
Definition: json_number_handling.h:16
Definition: db_command.h:9