An introduction to manipulating the output from FileMaker's ExecuteSQL function to return JSON, with emphasis on steps which can be taken to properly escape the returned values.
Update Aug 2021: The custom functions which utilize this technique can now be found at: https://the.fmsoup.org/t/cf-for-returning-executesql-results-as-json/2403