import json


def format_json(batched):
    """Format raw data into json format"""
    aggregated_events = []
    for event in batched:
        aggregated_events.append(json.dumps(event))
        aggregated_events.append("\n")
    return aggregated_events