Sha256: ce6364e61347f39717628b818a72d784bd2014f411401628c90362cf01615a95
Contents?: true
Size: 511 Bytes
Versions: 4
Compression:
Stored size: 511 Bytes
Contents
# frozen_string_literal: true require 'json' module I18n::Tasks module Data module Adapter module JsonAdapter extend 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
Version data entries
4 entries across 4 versions & 1 rubygems