v1.2.1
Latest
2020.3+
Class JsonObjectConverter
JsonObjectConverter overrides behaviour from JsonConverter to allow encapsulation of raw object types and conversion between different types.
Namespace: Unity.Services.Lobbies.Http
Syntax
[Preserve]
public class JsonObjectConverter : JsonConverter
Methods
CanConvert(Type)
Declaration
public override bool CanConvert(Type objectType)
Parameters
Type | Name | Description |
---|---|---|
Type | objectType |
Returns
Type | Description |
---|---|
Boolean |
ReadJson(JsonReader, Type, Object, JsonSerializer)
Declaration
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
JsonReader | reader | |
Type | objectType | |
Object | existingValue | |
JsonSerializer | serializer |
Returns
Type | Description |
---|---|
Object |
WriteJson(JsonWriter, Object, JsonSerializer)
Convert a JsonObject to JToken.
Declaration
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
JsonWriter | writer | |
Object | value | |
JsonSerializer | serializer |