Added parse json function, tests pass