Skip to content

feat: Add config option to pick json library#75

Merged
sn3p merged 2 commits intoDefactoSoftware:masterfrom
Blond11516:feat/json-lib-config
Jan 19, 2022
Merged

feat: Add config option to pick json library#75
sn3p merged 2 commits intoDefactoSoftware:masterfrom
Blond11516:feat/json-lib-config

Conversation

@Blond11516
Copy link
Contributor

Adds a configuration option to let the user specify their JSON library of choice.

Fixes #69.

(filename <> ".json")
|> File.read!()
|> Poison.decode!()
|> json_library().decode!()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to assume alternative JSON libs all have the decode!/1 fun?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with Jason and work as expected.

@sn3p sn3p merged commit 8d7ab99 into DefactoSoftware:master Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a config option to specify your JSON parsing library

2 participants