Need help with Python printing JSON output on one line

I’m trying to fix a custom plugin for monitoring Passenger output and having issues getting the executable file to print the JSON on one line. I work on the infrastructure side so Python is not my strong point at this time.

Here’s the portion of the code that I’m trying to get to print the output on one line.

   # Max pool size
    match ='Max pool size : (\d+)', out)
    if match:
        stats['Max pool size'] = int(
    self.checks_logger.debug('{"name": "passenger-status", "protocol_version": "1", "integration_version": "1.0.0", "metrics": [{ "event_type": "PassengerSample", "Max pool size": "%s",' % stats['Max pool size'])

    # App groups
    match ='App groups    : (\d+)', out)
    if match:
        stats['App groups'] = int(
    self.checks_logger.debug('"App groups": "%s",' %
            stats['App groups'])

    # Processes
    match ='Processes     : (\d+)', out)
    if match:
        stats['Processes'] = int(
    self.checks_logger.debug('"Processes": "%s",' %

   # Requests in top-level queue
    match ='Requests in top-level queue : (\d+)', out)
    if match:
        stats['Requests in top-level queue'] = int(
    self.checks_logger.debug('"Requests in top-level queue": "%s",' %
            stats['Requests in top-level queue'])

    # Requests in queue
    match ='Requests in queue: (\d+)', out)
    if match:
        stats['Requests in queue'] = int(
    self.checks_logger.debug('"Requests in queue": "%s"}]}' %
            stats['Requests in queue'])

    return stats

def run(self):
    stats = {}
    return stats

if __name__ == "__main__":
import logging
logger = logging.getLogger("Passenger")
passenger = Passenger(None, logger, None)

Current output:

{“name”: “passenger-status”, “protocol_version”: “1”, “integration_version”: “1.0.0”, “metrics”: [{ “event_type”: “PassengerSample”, “Max pool size”: “4”,
“App groups”: “1”,
“Processes”: “2”,
“Requests in top-level queue”: “0”,
“Requests in queue”: “0”}]}

Desired output:

{“name”: “passenger-status”, “protocol_version”: “1”, “integration_version”: “1.0.0”, “metrics”: [{ “event_type”: “PassengerSample”, “Max pool size”: “4”, “App groups”: “1”, “Processes”: “2”, “Requests in top-level queue”: “0”, “Requests in queue”: “0”}]}

Where am I going wrong here!?