TemporalZ

toJSON

Returns a string representing this instant in the RFC 9557 format (same as toString). Intended for JSON serialization.

See: Temporal.Instant.toJSON

Parameters

#
self:Instant
Instant
allocator:std.mem.Allocator
std.mem.Allocator

Source

Implementation

#
pub fn toJSON(self: Instant, allocator: std.mem.Allocator) ![]u8 {
    return self.toString(allocator, .{});
}