switch internal representation of json to make tests easier to write