Stream-to-stream JSON string escaping