'Converts successful result to output format.
Raises a ValueError exception if the output is too long.'

@staticmethod
def create_output_for_success(returned_result):

    json_output = json.dumps(returned_result)
    if (len(json_output) > 1023):
        raise ValueError('Length    of    task    output    is    too    long:    {0}'.format(json_output))
    return json_output
