Skip to content

Instantly share code, notes, and snippets.

@shdblowers
Last active October 26, 2018 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shdblowers/14e5479315d17da58ec7802c947847ab to your computer and use it in GitHub Desktop.
Save shdblowers/14e5479315d17da58ec7802c947847ab to your computer and use it in GitHub Desktop.
defmodule JSONPrinter do
use FilePrinter
@behaviour FilePrinter
@impl FilePrinter
def parse(str), do: {:ok, "some json " <> str} # ... parse JSON
@impl FilePrinter
def extensions, do: ["json"]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment