11 lines
354 B
Zig
11 lines
354 B
Zig
const std = @import("std");
|
|
const types = @import("../weather/types.zig");
|
|
|
|
pub fn render(allocator: std.mem.Allocator, data: types.WeatherData) ![]const u8 {
|
|
var output: std.ArrayList(u8) = .empty;
|
|
errdefer output.deinit(allocator);
|
|
|
|
try std.json.stringify(data, .{}, output.writer(allocator));
|
|
|
|
return output.toOwnedSlice(allocator);
|
|
}
|