diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2023-06-09 18:42:31 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2023-06-09 18:42:31 +0200 |
| commit | 6e53e8873071bc43984aa1f22aa3c3874643a381 (patch) | |
| tree | aa557fc20ca3ffc76671a93b540c8858d88b4e44 /src/server/response.odin | |
| parent | b13ba1f04b6442b15040b6f0dd1c0d7d3b5ce0f9 (diff) | |
Add custom marshal.
Diffstat (limited to 'src/server/response.odin')
| -rw-r--r-- | src/server/response.odin | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/response.odin b/src/server/response.odin index d31b3cd..916f1b1 100644 --- a/src/server/response.odin +++ b/src/server/response.odin @@ -7,7 +7,7 @@ send_notification :: proc( notification: Notification, writer: ^Writer, ) -> bool { - data, error := json.marshal(notification, {}, context.temp_allocator) + data, error := marshal(notification, {}, context.temp_allocator) header := fmt.tprintf("Content-Length: %v\r\n\r\n", len(data)) @@ -27,7 +27,7 @@ send_notification :: proc( } send_response :: proc(response: ResponseMessage, writer: ^Writer) -> bool { - data, error := json.marshal(response, {}, context.temp_allocator) + data, error := marshal(response, {}, context.temp_allocator) header := fmt.tprintf("Content-Length: %v\r\n\r\n", len(data)) @@ -47,7 +47,7 @@ send_response :: proc(response: ResponseMessage, writer: ^Writer) -> bool { } send_error :: proc(response: ResponseMessageError, writer: ^Writer) -> bool { - data, error := json.marshal(response, {}, context.temp_allocator) + data, error := marshal(response, {}, context.temp_allocator) header := fmt.tprintf("Content-Length: %v\r\n\r\n", len(data)) |