Module: RapidJSON
- Defined in:
- lib/rapidjson.rb,
lib/rapidjson.rb,
lib/rapidjson/version.rb,
lib/rapidjson/json_gem.rb,
lib/rapidjson/active_support_encoder.rb
Defined Under Namespace
Modules: JSONGem
Classes: ActiveSupportEncoder, Coder, EncodeError, Error, Fragment, ParseError
Constant Summary
collapse
- VERSION =
"0.2.0"
Class Method Summary
collapse
Class Method Details
.dump(object) ⇒ Object
Also known as:
encode
32
33
34
|
# File 'lib/rapidjson.rb', line 32
def dump(object)
DEFAULT_CODER.dump(object)
end
|
.json_escape ⇒ Object
.load(string) ⇒ Object
Also known as:
parse
27
28
29
|
# File 'lib/rapidjson.rb', line 27
def load(string)
DEFAULT_CODER.load(string)
end
|
.pretty_encode(object) ⇒ Object
37
38
39
|
# File 'lib/rapidjson.rb', line 37
def pretty_encode(object)
PRETTY_CODER.dump(object)
end
|
.valid_json?(string) ⇒ Boolean
41
42
43
|
# File 'lib/rapidjson.rb', line 41
def valid_json?(string)
DEFAULT_CODER.valid_json?(string)
end
|