i think i figured out a good way to parse json