forked from voxpupuli/json-schema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjson-schema.rb
24 lines (21 loc) · 842 Bytes
/
json-schema.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require 'rubygems'
if begin
Gem::Specification::find_by_name('multi_json')
rescue Gem::LoadError
false
rescue
Gem.available?('multi_json')
end
require 'multi_json'
# Force MultiJson to load an engine before we define the JSON constant here; otherwise,
# it looks for things that are under the JSON namespace that aren't there (since we have defined it here)
MultiJson.respond_to?(:adapter) ? MultiJson.adapter : MultiJson.engine
end
require 'rubygems'
require 'json-schema/util/hash'
require 'json-schema/util/array_set'
require 'json-schema/schema'
require 'json-schema/validator'
Dir[File.join(File.dirname(__FILE__), "json-schema/attributes/*.rb")].each {|file| require file }
Dir[File.join(File.dirname(__FILE__), "json-schema/validators/*.rb")].sort!.each {|file| require file }
require 'json-schema/uri/file'