mirror of
https://github.com/StarBeat/JsonRpc.git
synced 2026-03-08 03:55:29 +08:00
25 lines
574 B
C#
25 lines
574 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace JsonRPC.Protocol
|
|
{
|
|
[Serializable]
|
|
public class JsonRPCResponse
|
|
{
|
|
[JsonPropertyName("jsonrpc")]
|
|
public EJsonRPCVersion Version { get; set; } = EJsonRPCVersion.Version2;
|
|
|
|
[JsonPropertyName("error")]
|
|
public JsonRPCError? Error { get; set; }
|
|
|
|
[JsonPropertyName("id")]
|
|
public int Id { get; set; }
|
|
}
|
|
|
|
[Serializable]
|
|
public class JsonRPCResponse<T> : JsonRPCResponse
|
|
{
|
|
[JsonPropertyName("result")]
|
|
public T? Result { get; set; }
|
|
}
|
|
}
|