Thank you for the response! I had no idea you would answer so quickly.
I had another version of this going, and I combine what you wrote, with what I had going. So far it's working great other than some issues with the data source.
class AkamaiColumnRowsJSONHandler:
def __init__(self,**args):
pass
def __call__(self, response_object,raw_response_output,response_type,req_args,endpoint):
if response_type == "json":
raw_json = json.loads(raw_response_output)
columns = [str(row['name']).replace(" ","") for row in raw_json['columns']]
for row in raw_json['rows']:
new_event = {}
for a,b in zip(columns, row):
if not b: #Skip Null Valued Pairs
continue
new_event[a] = b
print_xml_stream(json.dumps(new_event))
else:
print_xml_stream(raw_response_output)
I'm really glad I was closer than I thought to a viable solution at the time I ran here for help. You and your tool are fantastic sir.
... View more