OpenNodex v0.3.1 OpenNodex.Parser View Source

Documentation for OpenNodex.Parser.

Link to this section Summary

Functions

Decode the return json from the API and extract the data key's value, converting the keys to atoms

Decode an error message from the API

Decode the return json from the API and extract the data key's value, retaining the keys as strings

Link to this section Functions

Link to this function

parse_atomized_keys(json) View Source

Decode the return json from the API and extract the data key's value, converting the keys to atoms.

## Examples

    iex> parse_string_keys(~s({"data":{"BTCUSD":{"USD":3845.30}}}))
    %{data: %{BTCUSD: %{USD: 3845.30}}}

Decode an error message from the API.

  ## Examples

      iex> parse_string_keys(~s({"message":"error message"})))
      "error message"

Decode the return json from the API and extract the data key's value, retaining the keys as strings.

## Examples

  iex> parse_string_keys(~s({"data":{"BTCUSD":{"USD":3845.30}}}))
  %{"data" => %{"BTCUSD" => %{"USD" => 3845.30}}}