InterSystems FAQ rubric
You can avoid the error by specifying a stream object as the argument of %ToJSON() used when generating a JSON string from a dynamic object.
A code example is below.
InterSystems HealthShare is a healthcare informatics platform for hospitals, integrated delivery networks (IDNs) and regional and national health information exchanges (HIE). HealthShare includes health information exchange, data aggregation, workflow, text analysis, and analytics technology.