Sha256: 8fcacdf517bf8fea1a91d9e4ce85b79cfd2523a54f81c951c422646d32b50963
Contents?: true
Size: 550 Bytes
Versions: 41
Compression:
Stored size: 550 Bytes
Contents
# frozen_string_literal: true require 'json' module I18n::Tasks module Data module Adapter module JsonAdapter class << self # @return [Hash] locale tree def parse(str, opts) JSON.parse(str, parse_opts(opts)) end # @return [String] def dump(tree, opts) JSON.generate(tree, parse_opts(opts)) end private def parse_opts(opts) opts.try(:symbolize_keys) || {} end end end end end end
Version data entries
41 entries across 41 versions & 3 rubygems