Module: Mayak::Json
- Extended by:
- T::Sig
- Defined in:
- lib/mayak/json.rb,
lib/mayak/json/encoder.rb
Defined Under Namespace
Modules: Encoder
Classes: ParsingError
Constant Summary
collapse
- JsonType =
T.type_alias {
T.any(
T::Array[T.untyped],
T::Hash[T.untyped, T.untyped],
String,
Integer,
Float
)
}
Class Method Summary
collapse
Class Method Details
.dump(obj) ⇒ Object
24
25
26
|
# File 'lib/mayak/json.rb', line 24
def self.dump(obj)
JSON.dump(obj)
end
|
.parse_unsafe!(string) ⇒ Object
36
37
38
|
# File 'lib/mayak/json.rb', line 36
def self.parse_unsafe!(string)
JSON.parse(string)
end
|