I was referred to this topic from another much more specific topic that’s closed to new replies…
To pkclubpaul I would say he needs to look at any code that’s using an echo statement. Possibly, in a custom shortcode function. I’ve been able to get past this by converting all of them to use print instead (still using an output buffer).
The original topic asks about JSON error when saving if using the block editor and the shortcode function contains the_excerpt(). I could not find a workaround for this one except to call get_content() and then substring the result. That does not produce the JSON error when saving the page that calls the code.