Add json_encode filter to prevent json errors