3#include <system/object_ext.h>
4#include <system/nullable.h>
5#include <system/guid.h>
6#include <system/exceptions.h>
7#include <system/diagnostics/debug.h>
8#include <system/details/patterns.h>
9#include <system/decimal.h>
10#include <system/date_time_offset.h>
11#include <system/date_time.h>
14#include "system/text/json/nodes/json_node.h"
15#include "system/text/json/nodes/json_node_options.h"
16#include "system/text/json/document/json_element.h"
17#include "system/text/json/throw_helper.h"
18#include "system/text/json/serialization/json_converter.h"
19#include "system/text/json/serialization/json_number_handling.h"
31template <
typename>
class JsonValue;
32template <
typename>
class JsonValueCustomized;
33class JsonValueOfElement;
34class JsonValueOfJsonBool;
35class JsonValueOfJsonNumber;
36class JsonValueOfJsonString;
37template <
typename>
class JsonValuePrimitive;
43class JsonValueConverter;
47class ValueStringBuilder;
64 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
117 value = System::Default<T>();
123 if (System::IsNull(jsonTypeInfo))
125 throw System::ArgumentNullException(u
"jsonTypeInfo");
128 if (System::IsNull(
value))
133 if (System::ObjectExt::Is<JsonNode>(
value))
138 jsonTypeInfo->EnsureConfigured();
141 if (System::Is<JsonElement>(
value, element) && jsonTypeInfo->get_EffectiveConverter()->get_IsInternalConverter())
146 return CreateFromTypeInfo<T>(
value, jsonTypeInfo, options);
163 return System::MakeObject<JsonValuePrimitive<T>>(
value, jsonTypeInfo->get_EffectiveConverter(), options);
166 return System::MakeObject<JsonValueCustomized<T>>(
value, jsonTypeInfo, options);
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:50
Contains the date and time of day relative to Coordinated Universal Time. Objects of this class shoul...
Definition: date_time_offset.h:16
Represents a decimal number. This type should be allocated on stack and passed to functions by value ...
Definition: decimal.h:107
Represents a Globally Unique IDentifier This type should be allocated on stack and passed to function...
Definition: guid.h:34
Forward declaration.
Definition: nullable.h:75
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
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:126
Definition: json_element.h:59
Definition: json_array.h:56
Definition: json_node.h:54
friend class JsonValueBase
Definition: json_node.h:63
Definition: json_object.h:56
Definition: json_value.h:60
static System::SharedPtr< JsonValueBase > Create(uint64_t value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(uint8_t value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > CreateFromTypeInfo(T value, System::SharedPtr< Serialization::Metadata::JsonTypeInfo< T > > jsonTypeInfo, Nullable< JsonNodeOptions > options=nullptr)
Definition: json_value.h:157
static System::SharedPtr< JsonValueBase > Create(Nullable< int64_t > value, Nullable< JsonNodeOptions > options=nullptr)
bool TryGetValue(T &value)
Definition: json_value.h:115
static System::SharedPtr< JsonValueBase > Create(Nullable< int8_t > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(JsonElement value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(Nullable< int32_t > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(DateTimeOffset value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(Nullable< Guid > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(Nullable< DateTimeOffset > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(Nullable< uint64_t > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(String value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(char16_t value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(int32_t value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(DateTime value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(int8_t value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(Nullable< char16_t > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(Nullable< int16_t > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(int16_t value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(Nullable< JsonElement > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(int64_t value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(bool value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(Decimal value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(uint16_t value, Nullable< JsonNodeOptions > options=nullptr)
static const String CreateDynamicCodeMessage
Definition: json_value.h:152
static System::SharedPtr< JsonValueBase > Create(Nullable< float > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(T value, System::SharedPtr< Serialization::Metadata::JsonTypeInfo< T > > jsonTypeInfo, Nullable< JsonNodeOptions > options=nullptr)
Definition: json_value.h:121
static System::SharedPtr< JsonValueBase > CreateFromElement(JsonElement element, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(Nullable< double > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(Nullable< DateTime > value, Nullable< JsonNodeOptions > options=nullptr)
bool DeepEqualsCore(System::SharedPtr< JsonNode > otherNode) override
static System::SharedPtr< JsonValueBase > Create(Nullable< Decimal > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(Guid value, Nullable< JsonNodeOptions > options=nullptr)
void GetPath(ValueStringBuilder &path, System::SharedPtr< JsonNode > child) override
static System::SharedPtr< JsonValueBase > Create(Nullable< uint8_t > value, Nullable< JsonNodeOptions > options=nullptr)
static const String CreateUnreferencedCodeMessage
Definition: json_value.h:151
static System::SharedPtr< JsonValueBase > Create(Nullable< uint16_t > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(Nullable< uint32_t > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(double value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(float value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(Nullable< bool > value, Nullable< JsonNodeOptions > options=nullptr)
static System::SharedPtr< JsonValueBase > Create(uint32_t value, Nullable< JsonNodeOptions > options=nullptr)
Definition: json_value_of_t.h:53
Definition: json_value_of_element.h:47
Definition: json_value_of_json_primitive.h:167
Definition: json_value_of_json_primitive.h:223
Definition: json_value_of_json_primitive.h:65
Definition: json_value_of_t_primitive.h:47
Definition: json_value_converter.h:43
Definition: json_type_info_of_t.h:84
static void ThrowArgumentException_NodeValueNotAllowed(String paramName)
Definition: value_string_builder.h:17
@ Text
Defines color adjustment information for text.
Definition: db_command.h:9
decltype(Ref(std::declval< T & >())) Ref(const std::reference_wrapper< T > &wrapper)
Wrapper to make sure Ref(std::ref(DynamicWeakPtr)) works.
Definition: dynamic_weak_ptr.h:207