Module: RapidJSON::JSONGem
- Defined in:
- lib/rapidjson/json_gem.rb
Constant Summary collapse
- GeneratorError =
RapidJSON::EncodeError
Class Method Summary collapse
- .dump(object, anIO = nil, limit = nil) ⇒ Object
- .generate(object, opts = nil) ⇒ Object
- .load(string, proc = nil, options = nil) ⇒ Object
- .parse(string, opts = nil) ⇒ Object
Class Method Details
.dump(object, anIO = nil, limit = nil) ⇒ Object
59 60 61 62 63 64 65 |
# File 'lib/rapidjson/json_gem.rb', line 59 def dump(object, anIO = nil, limit = nil) if anIO.nil? && limit.nil? DUMP_CODER.dump(object) else GEM.dump(object, anIO, limit) end end |
.generate(object, opts = nil) ⇒ Object
67 68 69 70 71 72 73 |
# File 'lib/rapidjson/json_gem.rb', line 67 def generate(object, opts = nil) if opts.nil? GENERATE_CODER.dump(object) else GEM.generate(object, opts) end end |
.load(string, proc = nil, options = nil) ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/rapidjson/json_gem.rb', line 43 def load(string, proc = nil, = nil) if proc.nil? && .nil? DEFAULT_CODER.load(string) else GEM.load(string, proc, ) end end |