DAT-2165 add helper function to create JSON