Exemple #1
0
def _convert_to_line_delimits(s):
    """Helper function that converts json lists to line delimited json."""

    # Determine we have a JSON list to turn to lines otherwise just return the
    # json object, only lists can
    if not s[0] == '[' and s[-1] == ']':
        return s
    s = s[1:-1]

    return convert_json_to_lines(s)
Exemple #2
0
def _convert_to_line_delimits(s):
    """Helper function that converts json lists to line delimited json."""

    # Determine we have a JSON list to turn to lines otherwise just return the
    # json object, only lists can
    if not s[0] == '[' and s[-1] == ']':
        return s
    s = s[1:-1]

    return convert_json_to_lines(s)