json preparation