module Crystalizer::JSON

Defined in:

json.cr
json/any.cr
json/deserialize.cr
json/serialize.cr

Class Method Summary

Class Method Detail

def self.deserialize(string_or_io : String | IO, to type : T.class) : T forall T #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : ::JSON::Serializable.class | Any.class) #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : Hash.class) #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : Array.class | Deque.class | Set.class) #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : Tuple.class) #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : NamedTuple.class) #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : Enum.class) #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : Bool.class) #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : Nil.class) #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : Path.class) #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : String.class) #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : Float.class) #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : Int.class) #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : Time.class) #

[View source]
def self.deserialize(pull : ::JSON::PullParser, to type : T.class) : T forall T #

[View source]
def self.deserialize_object_key?(string : String, to type : String.class) #

[View source]
def self.deserialize_object_key?(number : String, to type : Number::Primitive.class) #

[View source]
def self.parse(string_or_io : String | IO) : Any #

Parses a JSON document as a JSON::Any.


[View source]
def self.serialize(object, *, indent : String = " ") : String #

[View source]
def self.serialize(builder : ::JSON::Builder, object : O) forall O #

[View source]
def self.serialize(builder : ::JSON::Builder, time : Time) #

[View source]
def self.serialize(builder : ::JSON::Builder, object : Path | String | Symbol) #

[View source]
def self.serialize(builder : ::JSON::Builder, number : Number::Primitive) #

[View source]
def self.serialize(builder : ::JSON::Builder, null : Nil) #

[View source]
def self.serialize(builder : ::JSON::Builder, object : Enum) #

[View source]
def self.serialize(builder : ::JSON::Builder, bool : Bool) #

[View source]
def self.serialize(builder : ::JSON::Builder, named_tuple : NamedTuple) #

[View source]
def self.serialize(builder : ::JSON::Builder, array : Array | Deque | Set | Tuple) #

[View source]
def self.serialize(builder : ::JSON::Builder, hash : Hash) #

[View source]
def self.serialize(builder : ::JSON::Builder, object : ::JSON::Serializable) #

[View source]
def self.serialize(builder : ::JSON::Builder, any : Crystalizer::Any) #

[View source]
def self.serialize(io : IO, object, indent : String = " ") #

[View source]
def self.serialize_object_key(any : Crystalizer::Any) #

[View source]
def self.serialize_object_key(null : Nil) #

[View source]
def self.serialize_object_key(object : Path | String | Symbol | Number::Primitive) #

[View source]