abstract class Object
Overview
Object
is the base type of all Crystal objects.
Defined in:
CrSerializer/json/to_json.crCrSerializer/yaml/to_yaml.cr
Instance Method Summary
- #to_json(io : IO, serialization_groups : Array(String), expand : Array(String))
-
#to_json(serialization_groups : Array(String) = ["default"], expand : Array(String) = [] of String) : String
Serialize
self
to JSON. - #to_pretty_json(indent : String = " ", serialization_groups : Array(String) = ["default"], expand : Array(String) = [] of String)
- #to_pretty_json(io : IO, serialization_groups : Array(String), expand : Array(String), indent : String = " ")
-
#to_yaml(serialization_groups : Array(String) = ["default"], expand : Array(String) = [] of String) : String
Serialize
self
to YAML.
Instance Method Detail
def to_json(serialization_groups : Array(String) = ["default"], expand : Array(String) = [] of String) : String
#
Serialize self
to JSON.
Optionally, only serialize properties that are in serialization_groups. See the docs for more information.
Optionally, include expandable properties that are in expand. See the docs for more information.
def to_pretty_json(indent : String = " ", serialization_groups : Array(String) = ["default"], expand : Array(String) = [] of String)
#
def to_pretty_json(io : IO, serialization_groups : Array(String), expand : Array(String), indent : String = " ")
#
def to_yaml(serialization_groups : Array(String) = ["default"], expand : Array(String) = [] of String) : String
#
Serialize self
to YAML.
Optionally, only serialize properties that are in serialization_groups. See the docs for more information.
Optionally, include expandable properties that are in expand. See the docs for more information.