Created
February 18, 2015 16:58
-
-
Save sorentwo/2f8561482b5c66505633 to your computer and use it in GitHub Desktop.
Custom JSON encoding
This file contains hidden or 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
defimpl Poison.Encoder, for: App do | |
def encode(app, options) do | |
Poison.Encoder.Map.encode(%{id: app.id, name: app.name}, options) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment