struct

UUID

Inherits Comparable < Struct < Value < Object

Adds CON support to UUID for use in a CON mapping.

NOTE: require "uuid/con" is required to opt-in to this feature.

require "con"
require "uuid"
require "uuid/con"

class Example
  CON.mapping id: UUID
end

example = Example.from_con(%({"id": "ba714f86-cac6-42c7-8956-bcf5105e1b81"}))

uuid = UUID.new("87b3042b-9b9a-41b7-8b15-a93d3f17025e")
uuid.to_con # => "87b3042b-9b9a-41b7-8b15-a93d3f17025e"

Constructors

from_con(value, pull : CON::PullParser) : UUID
Source
from_con(pull : CON::PullParser) : UUID
Source

Instance methods

to_con(con : CON::Builder)
Source