SparkPost / elixir-sparkpost

SparkPost client library for Elixir https://developers.sparkpost.com
Apache License 2.0
44 stars 14 forks source link

SparkPost.Endpoint.decode_response_body/1 uses decoding as atoms #52

Open begedin opened 4 years ago

begedin commented 4 years ago

Creating this ticket so I can remove a TODO from code.

Poison.encode(keys: :atoms) is potentially unsafe for open ended structures such as metadata and substitution_data, as atoms are not garbage collected and are a definite (albeit often slow) memory leak. Substitution data and metadata should be decoded into a string keys map.