25 lines
687 B
C#
25 lines
687 B
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace xAiModels.Models
|
|
{
|
|
public class XAiMcpJsonRpcResponse
|
|
{
|
|
[JsonPropertyName("jsonrpc")]
|
|
public string JsonRpc { get; set; }
|
|
|
|
[JsonPropertyName("id")]
|
|
public string Id { get; set; }
|
|
|
|
[JsonPropertyName("result")]
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public JsonElement? Result { get; set; }
|
|
|
|
[JsonPropertyName("error")]
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public XAiMcpJsonRpcError Error { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public bool IsSuccess => Error is null;
|
|
}
|
|
} |