23 template <
typename T,
typename Enable =
void>
96 return static_cast<float>(element.
GetDouble());
123 template <
typename U>
127 for (
int i = 0; i < value.
GetCount(); ++i) {
135 for (
int i = 0; i < iLen; ++i) {
143 template <
typename U>
148 for (
int i = 0; i < keys.GetLength(); ++i) {
156 for (
int i = 0; i < keys.GetLength(); ++i) {
Defines common cross-platform macros, export decorators, and fundamental types.
Represents a specific JSON value within a JsonDocument.
Represents a strongly typed list of objects that can be accessed by index mirroring ....
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
Represents a collection of keys and values.
Array< TKey > GetKeys() const
void Add(const TKey &key, const TValue &value)
Represents a strongly typed list of objects accessible by index.
int GetCount() const
Gets the number of elements contained in the List.
void Add(const T &item)
Adds an object to the end of the List.
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Represents a specific JSON value within a JsonDocument or object hierarchy.
String GetString() const
Gets the value of the element as a string.
int GetArrayLength() const
Gets the number of values contained within the current JSON array value.
int GetInt32() const
Gets the current JSON number as a 32-bit signed integer.
Array< String > GetPropertyNames() const
Gets an array containing the names of all properties on the current JSON object.
bool TryGetProperty(const String &sPropertyName, JsonElement &objValue) const
Looks for a property named propertyName in the current JSON object.
String ToString() const
Serializes the element into a JSON string representation.
JsonElement GetArrayElement(int iIndex) const
Gets the value at the specified index in the current JSON array.
JsonElement()
Initializes a new instance of the JsonElement class representing undefined.
void AddArrayElement(const JsonElement &objElement)
Adds an element to the current JSON array.
long long GetInt64() const
Gets the current JSON number as a 64-bit signed integer.
bool GetBoolean() const
Gets the value of the element as a Boolean.
static JsonElement Parse(const String &sJson)
Parses text representing a single JSON value into a JsonElement.
void SetProperty(const String &sPropertyName, const JsonElement &objValue)
Sets or replaces a property on the current JSON object.
double GetDouble() const
Gets the current JSON number as a double.
Provides functionality to serialize objects to JSON strings and deserialize JSON strings to objects.
static T Deserialize(const String &sJson)
Parses the text representing a single JSON value into an instance of the type specified by a generic ...
static String Serialize(const T &value)
Converts the value of a type specified by a generic type parameter into a JSON string.
static Collections::Generic::Dictionary< String, U > Read(const JsonElement &element)
static JsonElement Write(const Collections::Generic::Dictionary< String, U > &value)
static JsonElement Write(const Collections::Generic::List< U > &value)
static Collections::Generic::List< U > Read(const JsonElement &element)
static JsonElement Write(const String &value)
static String Read(const JsonElement &element)
static bool Read(const JsonElement &element)
static JsonElement Write(const bool &value)
static double Read(const JsonElement &element)
static JsonElement Write(const double &value)
static float Read(const JsonElement &element)
static JsonElement Write(const float &value)
static JsonElement Write(const int &value)
static int Read(const JsonElement &element)
static long long Read(const JsonElement &element)
static JsonElement Write(const long long &value)
Primary template for type-specific JSON serialization converters.