File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
WebApiClientCore.Extensions.JsonRpc Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace WebApiClientCore.Extensions.JsonRpc
66 /// 表示JsonRpc请求内容
77 /// </summary>
88 class JsonRpcContent : BufferContent
9- {
9+ {
1010 /// <summary>
1111 /// 获取对应的ContentType
1212 /// </summary>
@@ -16,9 +16,9 @@ class JsonRpcContent : BufferContent
1616 /// JsonRpc请求内容
1717 /// </summary>
1818 /// <param name="mediaType">媒体类型</param>
19- public JsonRpcContent ( string ? mediaType )
19+ public JsonRpcContent ( string ? mediaType )
2020 : base ( mediaType ?? MediaType )
21- {
22- }
21+ {
22+ }
2323 }
2424}
Original file line number Diff line number Diff line change 1- namespace WebApiClientCore . Extensions . JsonRpc
1+ using System . Text . Json . Serialization ;
2+
3+ namespace WebApiClientCore . Extensions . JsonRpc
24{
35 /// <summary>
46 /// 表示JsonRpc的错误内容
@@ -8,16 +10,19 @@ public class JsonRpcError
810 /// <summary>
911 /// 错误码
1012 /// </summary>
13+ [ JsonPropertyName ( "code" ) ]
1114 public int Code { get ; set ; }
1215
1316 /// <summary>
1417 /// 提示消息
1518 /// </summary>
19+ [ JsonPropertyName ( "message" ) ]
1620 public string ? Message { get ; set ; }
1721
1822 /// <summary>
1923 /// 错误内容
2024 /// </summary>
25+ [ JsonPropertyName ( "data" ) ]
2126 public object ? Data { get ; set ; }
2227 }
2328}
You can’t perform that action at this time.
0 commit comments