refactor out json parser so customers can swap in their own json parsers