Class: EJSON

Inherits:
Object
  • Object
show all
Defined in:
lib/ejson.rb,
lib/ejson/version.rb,
lib/ejson/rails/engine.rb

Defined Under Namespace

Modules: Rails

Constant Summary collapse

VERSION =
'0.2.7'.freeze

Class Method Summary collapse

Class Method Details

.parse_bson(json_string) ⇒ Object



15
16
17
18
19
# File 'lib/ejson.rb', line 15

def parse_bson(json_string)
  boot_bson

  ExtendedJSON.parse(json_string, actions: ParserAction::BSON.new)
end

.parse_wrap(json_string) ⇒ Object



21
22
23
# File 'lib/ejson.rb', line 21

def parse_wrap(json_string)
  ExtendedJSON.parse(json_string, actions: ParserAction::Wrap.new)
end

.validate(json_string) ⇒ Object



11
12
13
# File 'lib/ejson.rb', line 11

def validate(json_string)
  ExtendedJSON.parse(json_string, actions: ParserAction::Abstract)
end