IntelligenceX
Class

JsonMapper

Namespace IntelligenceX.Json
Assembly IntelligenceX
Modifiers static

Maps common CLR types to JsonValue representations.

Inheritance

  • Object
  • JsonMapper

Methods

FromDictionary 2 overloads
public static JsonObject FromDictionary(IReadOnlyDictionary<String, Object> dictionary) #
Returns: JsonObject

Converts a dictionary to a JsonObject.

Parameters

dictionary System.Collections.IDictionary
Dictionary to map.

Returns

The mapped JSON object.

FromDictionary(System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object} dictionary) #

Converts a dictionary with string keys to a JsonObject.

Parameters

dictionary System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object}
Dictionary to map.

Returns

The mapped JSON object.

public static JsonArray FromEnumerable(IEnumerable enumerable) #
Returns: JsonArray

Converts an enumerable into a JsonArray.

Parameters

enumerable System.Collections.IEnumerable
Enumerable to map.

Returns

The mapped JSON array.

public static JsonValue FromObject(Object value) #
Returns: JsonValue

Converts an object into a JsonValue.

Parameters

value System.Object
Value to map.

Returns

The mapped JSON value.