예제 #1
0
파일: jsonl.py 프로젝트: Schmedu/gluon-ts
def dump(objects, file_obj):
    for object_ in objects:
        file_obj.write(json.dumps(object_))
        file_obj.write("\n")
예제 #2
0
 def dump_line(f, line):
     f.write(json.dumps(line).encode("utf-8"))
     f.write("\n".encode("utf-8"))