class I18n::Backends::JSON
- I18n::Backends::JSON
- I18n::Backend
- Reference
- Object
Defined in:
i18n/backends/json.crClass Method Summary
-
.merge_json(string)
Concatenates multiple JSONs into one in a raw string
Instance Method Summary
-
#load
See
Backend.load
.
Instance methods inherited from class I18n::Backend
data : JSON::Any | YAML::Any | Nil
data,
load
load,
load_paths : Array(String)
load_paths,
translate(keys : Array(String), locale : String, count : Int32 | Nil = nil)
translate
Class methods inherited from class I18n::Backend
quantity_key_procs : Hash(String, QuantityKeyProc)
quantity_key_procs
Class Method Detail
def self.merge_json(string)
#
Concatenates multiple JSONs into one in a raw string
string = <<-END
{
"foo": "bar"
}
{
"bar": "baz"
}
END
merge_json(string)
# {
# "foo": "bar",
# "bar": "baz"
# }