Skip to content
代码片段 群组 项目
提交 9f9c79bb 编辑于 作者: Ben Adams's avatar Ben Adams 提交者: Sébastien Ros
浏览文件

Use same code for Json Platform as TE (#7292)

上级 6e253996
No related branches found
No related tags found
无相关合并请求
......@@ -117,7 +117,7 @@ namespace PlatformBenchmarks
// Content-Length header
writer.Write(_headerContentLength);
var jsonPayload = JsonSerializer.ToBytes(new { message = "Hello, World!" }, SerializerOptions);
var jsonPayload = JsonSerializer.ToUtf8Bytes(new JsonMessage { message = "Hello, World!" }, SerializerOptions);
writer.WriteNumeric((uint)jsonPayload.Length);
// End of headers
......@@ -155,5 +155,10 @@ namespace PlatformBenchmarks
PlainText,
Json
}
public struct JsonMessage
{
public string message { get; set; }
}
}
}
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册