Writes JSON elements to the DOM and vice versa.