Class: MultiJson::Adapters::Yajl
- Inherits:
-
MultiJson::Adapter
- Object
- MultiJson::Adapter
- MultiJson::Adapters::Yajl
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/multi_json-1.15.0/lib/multi_json/adapters/yajl.rb
Overview
Use the Yajl-Ruby library to dump/load.
Constant Summary collapse
- ParseError =
::Yajl::ParseError
Instance Method Summary collapse
Methods inherited from MultiJson::Adapter
Methods included from Options
#default_dump_options, #default_load_options, #dump_options, #dump_options=, #load_options, #load_options=
Methods included from Singleton
Instance Method Details
#dump(object, options = {}) ⇒ Object
14 15 16 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/multi_json-1.15.0/lib/multi_json/adapters/yajl.rb', line 14 def dump(object, = {}) ::Yajl::Encoder.encode(object, ) end |
#load(string, options = {}) ⇒ Object
10 11 12 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/multi_json-1.15.0/lib/multi_json/adapters/yajl.rb', line 10 def load(string, = {}) ::Yajl::Parser.new(:symbolize_keys => [:symbolize_keys]).parse(string) end |