abstracting crumb and json decode