Refactored json parsing of strings to save having to do it multiple times for multiple injections