Skip to content

Commit

Permalink
Use OJ instead of JSON if available
Browse files Browse the repository at this point in the history
This might represent a large gain in performance, but currently testing it without requiring it
  • Loading branch information
lmrodriguezr committed Mar 20, 2024
1 parent 6ade0b4 commit 91ee900
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/miga/json.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# frozen_string_literal: true

require 'json'
begin
require 'oj'
OJ.mimic_JSON()
rescue LoadError
# Do nothing if not available
end

##
# Taxonomic classifications in MiGA.
Expand Down
2 changes: 1 addition & 1 deletion lib/miga/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module MiGA
# - String indicating release status:
# - rc* release candidate, not released as gem
# - [0-9]+ stable release, released as gem
VERSION = [1.3, 13, 5].freeze
VERSION = [1.3, 13, 6].freeze

##
# Nickname for the current major.minor version.
Expand Down

0 comments on commit 91ee900

Please sign in to comment.