module Servo::Model::TimestampConverter
Overview
JSON converter for serializing and deserializing an ISO8601 timestamp into its
Time
representation.
Defined in:
model/converters/timestamp_converter.crClass Method Summary
-
.from_json(parser : JSON::PullParser) : Time | Nil
Deserializes an ISO861 timestamp string to a
Time
object. -
.to_json(value : Time | Nil, builder : JSON::Builder) : String
Serializes a
Time
object into an ISO861 timestamp string.
Class Method Detail
def self.from_json(parser : JSON::PullParser) : Time | Nil
#
Deserializes an ISO861 timestamp string to a Time
object.
def self.to_json(value : Time | Nil, builder : JSON::Builder) : String
#
Serializes a Time
object into an ISO861 timestamp string.
This string is null if the value was nil.