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, groups : Array(String), expand : Array(String))
-
#to_json(groups : Array(String) = ["default"], expand : Array(String) = [] of String) : String
Serialize
selfto JSON. - #to_pretty_json(indent : String = " ", groups : Array(String) = ["default"], expand : Array(String) = [] of String)
- #to_pretty_json(io : IO, groups : Array(String), expand : Array(String), indent : String = " ")
-
#to_yaml(groups : Array(String) = ["default"], expand : Array(String) = [] of String) : String
Serialize
selfto YAML.
Instance Method Detail
Serialize self to JSON.
Optionally, only serialize properties that are in 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 = " ", groups : Array(String) = ["default"], expand : Array(String) = [] of String)
#
def to_pretty_json(io : IO, groups : Array(String), expand : Array(String), indent : String = " ")
#