jeffweiss / forcex

Elixir library for the Force.com / Salesforce / SFDC REST API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switch from Poison to Jason

fastjames opened this issue · comments

Poison has gone several months without a merge or update, and newer projects appear to prefer Jason for performance reasons. Since forcex only uses Poison in 3 or 4 locations, I'm hopeful that the conversion would be straightforward.

One point that caught my eye was that the current calls to Poison.decode!/2 look like this:

Poison.decode!(body, keys: :atoms)

The keys: :atoms option is supposed to use atoms for the map keys in the output. However, I reviewed the repo history and when it switched from JSX to Poison (c19d34f), that option was not already in use on the JSX call. This is relevant because as far as I can tell, Jason does not offer an option to use atoms as keys when decoding.

Also, I learned that Jason added the keys: :atoms option in a later version than the one I was viewing, so the transition is very clean.