Sha256: b738bbd5e5fd0a68639a7a95b9a6d7a9db1d972dc40867bde6535eea9de59634

Contents?: true

Size: 386 Bytes

Versions: 8

Compression:

Stored size: 386 Bytes

Contents

# coding: utf-8
require 'json'

module I18n::Tasks
  module Data
    module Adapter
      module JsonAdapter
        extend self

        # @return [Hash] locale tree
        def parse(str, opts)
          JSON.parse(str, opts || {})
        end

        # @return [String]
        def dump(tree, opts)
          JSON.generate(tree, opts || {})
        end

      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
i18n-tasks-0.5.4 lib/i18n/tasks/data/adapter/json_adapter.rb
i18n-tasks-0.5.3 lib/i18n/tasks/data/adapter/json_adapter.rb
i18n-tasks-0.5.2 lib/i18n/tasks/data/adapter/json_adapter.rb
i18n-tasks-0.5.1 lib/i18n/tasks/data/adapter/json_adapter.rb
i18n-tasks-0.5.0 lib/i18n/tasks/data/adapter/json_adapter.rb
i18n-tasks-0.4.5 lib/i18n/tasks/data/adapter/json_adapter.rb
i18n-tasks-0.4.4 lib/i18n/tasks/data/adapter/json_adapter.rb
i18n-tasks-0.4.3 lib/i18n/tasks/data/adapter/json_adapter.rb