Sha256: 367ea883863e491556d3d1ec60e509ff1057d8d4cfc178705f339be36174b4bc

Contents?: true

Size: 339 Bytes

Versions: 6

Compression:

Stored size: 339 Bytes

Contents

module Lokalise
  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

6 entries across 6 versions & 1 rubygems

Version Path
ruby-lokalise-api-2.8.0 lib/ruby-lokalise-api/json_handler.rb
ruby-lokalise-api-2.7.0 lib/ruby-lokalise-api/json_handler.rb
ruby-lokalise-api-2.6.1 lib/ruby-lokalise-api/json_handler.rb
ruby-lokalise-api-2.6.0 lib/ruby-lokalise-api/json_handler.rb
ruby-lokalise-api-2.5.0 lib/ruby-lokalise-api/json_handler.rb
ruby-lokalise-api-2.4.0 lib/ruby-lokalise-api/json_handler.rb