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
6
6
/// 表示JsonRpc请求内容
7
7
/// </summary>
8
8
class JsonRpcContent : BufferContent
9
- {
9
+ {
10
10
/// <summary>
11
11
/// 获取对应的ContentType
12
12
/// </summary>
@@ -16,9 +16,9 @@ class JsonRpcContent : BufferContent
16
16
/// JsonRpc请求内容
17
17
/// </summary>
18
18
/// <param name="mediaType">媒体类型</param>
19
- public JsonRpcContent ( string ? mediaType )
19
+ public JsonRpcContent ( string ? mediaType )
20
20
: base ( mediaType ?? MediaType )
21
- {
22
- }
21
+ {
22
+ }
23
23
}
24
24
}
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
2
4
{
3
5
/// <summary>
4
6
/// 表示JsonRpc的错误内容
@@ -8,16 +10,19 @@ public class JsonRpcError
8
10
/// <summary>
9
11
/// 错误码
10
12
/// </summary>
13
+ [ JsonPropertyName ( "code" ) ]
11
14
public int Code { get ; set ; }
12
15
13
16
/// <summary>
14
17
/// 提示消息
15
18
/// </summary>
19
+ [ JsonPropertyName ( "message" ) ]
16
20
public string ? Message { get ; set ; }
17
21
18
22
/// <summary>
19
23
/// 错误内容
20
24
/// </summary>
25
+ [ JsonPropertyName ( "data" ) ]
21
26
public object ? Data { get ; set ; }
22
27
}
23
28
}
You can’t perform that action at this time.
0 commit comments