Sha256: f606bf7301cfd2fe14e75c538fc25d342c754d027e22988ae682c21f1faa1649

Contents?: true

Size: 394 Bytes

Versions: 9

Compression:

Stored size: 394 Bytes

Contents

# frozen_string_literal: true

require 'json'

module RatingChgkV2
  module JsonHandler
    # JSON custom parser. Uses built-in JSON by default but can be overridden to any other parser

    # Converts Ruby object to JSON
    def custom_dump(obj)
      JSON.dump obj
    end

    # Converts JSON to Ruby object
    def custom_load(obj)
      JSON.parse obj
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rating-chgk-v2-1.6.0 lib/rating_chgk_v2/json_handler.rb
rating-chgk-v2-1.5.0 lib/rating_chgk_v2/json_handler.rb
rating-chgk-v2-1.4.0 lib/rating_chgk_v2/json_handler.rb
rating-chgk-v2-1.3.0 lib/rating_chgk_v2/json_handler.rb
rating-chgk-v2-1.2.0 lib/rating_chgk_v2/json_handler.rb
rating-chgk-v2-1.1.0 lib/rating_chgk_v2/json_handler.rb
rating-chgk-v2-1.0.1 lib/rating_chgk_v2/json_handler.rb
rating-chgk-v2-1.0.0 lib/rating_chgk_v2/json_handler.rb
rating-chgk-v2-1.0.0.rc1 lib/rating_chgk_v2/json_handler.rb