class I18n::Backends::JSON

Defined in:

i18n/backends/json.cr

Class Method Summary

Instance Method Summary

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"
# }

[View source]

Instance Method Detail

def load #

[View source]