Cldr.Json (cldr_utils v2.29.1)

View Source

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

decode!(string)

(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}

decode!(string, options)