def get_json_content(window, simple_mode=True):
    """
    Extract information from json to a dict

    :param window:
    :return:
    """
    info = {'left_index': window.left, 'right_index': window.right,
        'center_index': window.center, 'channel_id': window.channel_id,
        'time_of_first_sample': window.time_of_first_sample, 'max_cc_value':
        window.max_cc_value, 'cc_shift_in_samples': window.cc_shift,
        'cc_shift_in_seconds': window.cc_shift_in_seconds, 'dlnA': window.
        dlnA, 'dt': window.dt, 'min_period': window.min_period,
        'absolute_starttime': window.absolute_starttime, 'absolute_endtime':
        window.absolute_endtime, 'relative_starttime': window.
        relative_starttime, 'relative_endtime': window.relative_endtime,
        'window_weight': window.weight}
    if not simple_mode:
        info['phase_arrivals'] = window.phase_arrivals
    if 'channel_id_2' in dir(window):
        info['channel_id_2'] = window.channel_id_2
    return info
