View Source Cldr.Json (cldr_utils v2.28.1)

A wrapper for the OTP 27 :json module.

It implements a decode!/1 function that wraps :json.decode/1 with decode!/1 so that its compatible with the calling conventions of Elixir - which is used by ex_cldr.

This allows configuration such as:

config :ex_cldr,
  json_library: Cldr.Json

Summary

Functions

Implements a Jason-compatible decode!/1,2 function suitable for decoding CLDR json data.

Functions

Link to this function

decode!(string)

View Source (since 2.27.0)

Implements a Jason-compatible decode!/1,2 function suitable for decoding CLDR json data.

Example

iex> Cldr.Json.decode!("{\"foo\": 1}")
%{"foo" => 1}

iex> Cldr.Json.decode!("{\"foo\": 1}", keys: :atoms)
%{foo: 1}
Link to this function

decode!(string, options)

View Source