3#include <system/type_info.h>
4#include <system/span.h>
5#include <system/scope_guard.h>
6#include <system/object_ext.h>
7#include <system/nullable.h>
8#include <system/exceptions.h>
9#include <system/diagnostics/debug.h>
10#include <system/details/pointer_collection_helpers.h>
11#include <system/default.h>
14#include "system/text/json/nodes/json_node_options.h"
15#include "system/text/json/nodes/json_node.h"
16#include "system/text/json/nodes/json_value_of_t.h"
17#include "system/text/json/serialization/json_serializer_helpers.h"
18#include "system/text/json/writer/utf8_json_writer.h"
19#include "system/text/json/serialization/json_serializer_options.h"
20#include "system/text/json/document/json_value_kind.h"
21#include "system/text/json/writer/utf8_json_writer_cache.h"
22#include "system/text/json/writer/json_writer_options.h"
23#include "system/text/json/pooled_byte_buffer_writer.h"
24#include "system/text/json/reader/utf8_json_reader.h"
25#include "system/text/json/reader/json_reader_helper.h"
26#include "system/text/json/json_token_type.h"
34class JsonSerializerOptions;
47template<
typename TValue>
53 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
54 RTTI_INFO_TEMPLATE_CLASS(
ThisType, ThisTypeBaseTypesInfo);
63 System::Details::ThisProtector __local_self_ref(
this);
65 _jsonTypeInfo = jsonTypeInfo;
75 if (System::IsNull(writer))
77 throw System::ArgumentNullException(u
"writer");
82 if (!(options ==
nullptr) && options != jsonTypeInfo->get_Options())
84 options->MakeReadOnly();
85 jsonTypeInfo = System::ExplicitCast<System::Text::Json::Serialization::Metadata::JsonTypeInfo<TValue>>(options->GetTypeInfoInternal(System::ObjectExt::GetType<TValue>()));
97 System::Details::CollectionHelpers::SetWeakPointer(0, _jsonTypeInfo);
105 #ifdef ASPOSE_GET_SHARED_MEMBERS
106 void GetSharedMembers(System::Object::shared_members_type& result)
const override
110 result.Add(
"System::Text::Json::Nodes::JsonValueCustomized::_jsonTypeInfo", this->_jsonTypeInfo);
111 result.Add(
"System::Text::Json::Nodes::JsonValueCustomized::_valueKind", this->_valueKind);
131 auto __finally_guard_0 = ::System::MakeScopeGuard([&output, &writer]()
140 Utf8JsonReader reader = Utf8JsonReader(output->get_WrittenSpan());
141 bool success = reader.Read();
Forward declaration.
Definition: nullable.h:75
static auto CoalesceAssign(T0 &value, T1 func) -> T0 &
Implementation of '??=' operator translation.
Definition: object_ext.h:748
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:51
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
static JsonValueKind ToValueKind(JsonTokenType tokenType)
static const int32_t BufferSizeDefault
Definition: json_serializer_options.h:437
Definition: json_node.h:54
Definition: json_value_of_t_customized.h:49
void WriteTo(System::SharedPtr< Utf8JsonWriter > writer, System::SharedPtr< JsonSerializerOptions > options=nullptr) override
Definition: json_value_of_t_customized.h:73
System::SharedPtr< JsonNode > DeepCloneCore() override
Definition: json_value_of_t_customized.h:68
JsonValueCustomized(TValue value, System::SharedPtr< Serialization::Metadata::JsonTypeInfo< TValue > > jsonTypeInfo, Nullable< JsonNodeOptions > options=nullptr)
Definition: json_value_of_t_customized.h:60
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
Definition: json_value_of_t_customized.h:91
Definition: json_value_of_t.h:53
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
Definition: json_value_of_t.h:156
Definition: json_type_info_of_t.h:84
static System::SharedPtr< Utf8JsonWriter > RentWriterAndBuffer(System::SharedPtr< JsonSerializerOptions > options, System::SharedPtr< PooledByteBufferWriter > &bufferWriter)
static void ReturnWriterAndBuffer(System::SharedPtr< Utf8JsonWriter > writer, System::SharedPtr< PooledByteBufferWriter > bufferWriter)
@ Text
Defines color adjustment information for text.
JsonValueKind
Definition: json_value_kind.h:12
Definition: db_command.h:9