Replace HTML with JSON