Good idea. This might work:


ClassMethod HandleJSON()
{
	S Results= {
		"ClassA":{"ClassName":"ClassA","ACount":367191880,"BCount":367191880,"CurrentDiff":0,"PreviousDiff":0,"ReportDate":"2024-03-02 00:00:00"},
		"ClassB":{"ClassName":"ClassB","ACount":5352149227,"BCount":5352149227,"CurrentDiff":0,"PreviousDiff":0,"ReportDate":"2024-03-02 00:00:00"}
	}
	
	w ..GetCsv(Results.%ToJSON())
}

ClassMethod GetCsv(json As %String) As %String [ Language = python ]
{
		
	import pandas
	
	df = pandas.read_json(json, orient="index")
	
	return df.to_csv(index=False)
}