CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
json_object_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_object.h"
9
10namespace System
11{
12class String;
13namespace Text
14{
15namespace Json
16{
17class JsonSerializerOptions;
18namespace Nodes
19{
20class JsonNodeOptions;
21} // namespace Nodes
22class ReadStack;
23namespace Serialization
24{
25template <typename> class JsonConverter;
26enum class JsonNumberHandling;
27namespace Metadata
28{
29class JsonTypeInfoBase;
30} // namespace Metadata
31} // namespace Serialization
32class Utf8JsonReader;
33class Utf8JsonWriter;
34} // namespace Json
35} // namespace Text
36class TypeInfo;
37} // namespace System
38
39namespace System {
40
41namespace Text {
42
43namespace Json {
44
45namespace Serialization {
46
47namespace Converters {
48
49class JsonObjectConverter final : public JsonConverter<System::SharedPtr<Nodes::JsonObject>>
50{
53
54 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
55 RTTI_INFO_DECL();
56
57public:
58
66 void SetTemplateWeakPtr(uint32_t argument) override;
67
68};
69
70} // namespace Converters
71} // namespace Serialization
72} // namespace Json
73} // namespace Text
74} // namespace System
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:126
Definition: json_node_options.h:14
Definition: read_stack.h:35
static System::SharedPtr< Nodes::JsonObject > ReadAsJsonElement(Utf8JsonReader &reader, Nodes::JsonNodeOptions options)
System::SharedPtr< Nodes::JsonObject > Read(Utf8JsonReader &reader, const System::TypeInfo &typeToConvert, System::SharedPtr< JsonSerializerOptions > options) override
void WriteExtensionDataValue(System::SharedPtr< Utf8JsonWriter > writer, System::SharedPtr< Nodes::JsonObject > value, System::SharedPtr< JsonSerializerOptions > options) override
void ReadElementAndSetProperty(System::SharedPtr< Object > obj, String propertyName, Utf8JsonReader &reader, System::SharedPtr< JsonSerializerOptions > options, ReadStack &state) override
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
static System::SharedPtr< Nodes::JsonObject > ReadAsJsonNode(Utf8JsonReader &reader, Nodes::JsonNodeOptions options)
void Write(System::SharedPtr< Utf8JsonWriter > writer, System::SharedPtr< Nodes::JsonObject > value, System::SharedPtr< JsonSerializerOptions > options) override
void ConfigureJsonTypeInfo(System::SharedPtr< Metadata::JsonTypeInfoBase > jsonTypeInfo, System::SharedPtr< JsonSerializerOptions > options) override
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