Sha256: 2b853abb7b5d51076b3d4c2a4fd064b2349772d6d70befb6b199baffb220b13f

Contents?: true

Size: 661 Bytes

Versions: 9

Compression:

Stored size: 661 Bytes

Contents

require_relative "json_schema/configuration"
require_relative "json_schema/document_store"
require_relative "json_schema/parser"
require_relative "json_schema/reference_expander"
require_relative "json_schema/schema"
require_relative "json_schema/schema_error"
require_relative "json_schema/validator"

module JsonSchema
  def self.configure
    yield configuration
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.parse(data)
    parser = Parser.new
    if schema = parser.parse(data)
      [schema, nil]
    else
      [nil, parser.errors]
    end
  end

  def self.parse!(data)
    Parser.new.parse!(data)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
json_schema-0.11.0 lib/json_schema.rb
json_schema-0.10.0 lib/json_schema.rb
json_schema-0.9.0 lib/json_schema.rb
json_schema-0.8.0 lib/json_schema.rb
json_schema-0.7.1 lib/json_schema.rb
json_schema-0.7.0 lib/json_schema.rb
json_schema-0.6.2 lib/json_schema.rb
json_schema-0.6.1 lib/json_schema.rb
json_schema-0.6.0 lib/json_schema.rb