Interface ISerializer
Used to serialize requests and deserialize the responses from MercadoPago's APIs. The serializer must handle snake case properties and date format must be
yyyy-MM-dd'T'HH:mm:ss.fffK
Namespace: MercadoPago.Serialization
Assembly: MercadoPago.dll
Syntax
public interface ISerializer
Methods
| Edit this page View SourceDeserializeFromJson<TResponse>(string)
Deserialize the JSON string as a object.
Declaration
TResponse DeserializeFromJson<TResponse>(string json) where TResponse : new()
Parameters
Type | Name | Description |
---|---|---|
string | json | The JSON string. |
Returns
Type | Description |
---|---|
TResponse | The deserialized object from the JSON string. |
Type Parameters
Name | Description |
---|---|
TResponse | The type of response object. |
SerializeToJson(object)
Serializes the request as a JSON string.
Declaration
string SerializeToJson(object request)
Parameters
Type | Name | Description |
---|---|---|
object | request | The request object. |
Returns
Type | Description |
---|---|
string | The serialized request as a JSON string. |
SerializeToQueryStringAsync(object)
Serializes the request object as query string parameters.
Declaration
Task<string> SerializeToQueryStringAsync(object request)
Parameters
Type | Name | Description |
---|---|---|
object | request | The request object. |
Returns
Type | Description |
---|---|
Task<string> | A task whose result is the serialized request as query string parameters. |