Created
January 13, 2016 12:33
-
-
Save hairyhum/2fd3e3213867fc51497b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(json). | |
-export([decode/1, encode/1]). | |
% JSON_CODEC can be defined during compilation | |
-ifndef(JSON_CODEC). | |
% Default to jsx | |
-define(JSON_CODEC, jsx). | |
-endif | |
decode(Json) -> | |
?JSON_CODEC:decode(Json, return_maps). | |
encode(Data) -> | |
?JSON_CODEC:encode(Data). | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment