{"id":3073,"date":"2026-11-14T13:15:57","date_gmt":"2026-11-14T04:15:57","guid":{"rendered":"https:\/\/danlabs.kr\/?p=3073"},"modified":"2026-11-14T13:15:57","modified_gmt":"2026-11-14T04:15:57","slug":"python-jsonl-read-write-line-errors","status":"publish","type":"post","link":"https:\/\/danlabs.kr\/?p=3073","title":{"rendered":"Python JSONL \uc77d\uace0 \uc4f0\uae30 \u2014 \uc624\ub958 \ub09c \uc904\uc744 \ucc3e\uace0 \uacc4\uc18d \ucc98\ub9ac\ud558\uae30"},"content":{"rendered":"<p>\ubc30\uce58 \ub85c\uadf8\ub97c \uc77d\ub2e4\uac00 \ud55c \uc904\uc774 \uae68\uc84c\ub2e4\uace0 \ud30c\uc77c \uc804\uccb4\ub97c \ubc84\ub9b4 \ud544\uc694\ub294 \uc5c6\uc5b4\uc694. JSONL\uc740 \uc904\ub9c8\ub2e4 \ub3c5\ub9bd\ub41c JSON \uac12\uc744 \uc800\uc7a5\ud558\ubbc0\ub85c, \uc6d0\ub798 \uc904 \ubc88\ud638\ub97c \ub0a8\uae30\uba74\uc11c \uc798\ubabb\ub41c \uae30\ub85d\uacfc \uc815\uc0c1 \uae30\ub85d\uc744 \ub098\ub220 \ucc98\ub9ac\ud560 \uc218 \uc788\uc5b4\uc694. \ub2e4\ub9cc \uc624\ub958\ub97c \uac74\ub108\ub6f8\uc9c0\ub294 \ub370\uc774\ud130\uc758 \uc6a9\ub3c4\uc5d0 \ub530\ub77c \uc815\ud574\uc57c \ud574\uc694.[2]<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-inline1.jpg\" alt=\"UTF-8\uacfc \uc904\ub9c8\ub2e4 \uc720\ud6a8\ud55c JSON \uac12 \ud558\ub098, \ubc30\uc5f4\u00b7null \ud5c8\uc6a9 \ubc0f \ube48 \uc904 \uc624\ub958\ub97c \uc124\uba85\ud558\ub294 \uc0dd\uc131 \ub3c4\uc2dd\" width=\"1280\" height=\"720\" loading=\"lazy\"><figcaption>\uc774\ubbf8\uc9c0\uc640 \ub3c4\uc2dd\uc740 GPT\ub85c \uc0dd\uc131\ud55c \uac1c\ub150 \uc2dc\uac01\ud654\uc774\uba70, \uc2e4\uc81c \uc571 \ud654\uba74 \ucea1\ucc98\uac00 \uc544\ub2c8\uc5d0\uc694.<\/figcaption><\/figure>\n<h2>JSON \ud30c\uc77c \ud558\ub098\uc640 JSONL \uc5ec\ub7ec \uc904\uc740 \uc77d\ub294 \ub2e8\uc704\uac00 \ub2ec\ub77c\uc694<\/h2>\n<p>\uc77c\ubc18 JSON \ud30c\uc77c\uc740 \ubb38\uc11c \ud558\ub098\uc608\uc694. \uac1d\uccb4 \uc5ec\ub7ec \uac1c\ub97c \ud55c \ud30c\uc77c\uc5d0 \uc5f0\ub2ec\uc544 <code>json.dump()<\/code>\ub85c \uc4f0\uba74 \uc720\ud6a8\ud55c JSON \ubb38\uc11c\uac00 \ub418\uc9c0 \uc54a\uc544\uc694. Python \uacf5\uc2dd \ubb38\uc11c\ub3c4 JSON\uc5d0\ub294 \ub808\ucf54\ub4dc \uacbd\uacc4\ub97c \ud45c\uc2dc\ud558\ub294 \ud504\ub808\uc774\ubc0d\uc774 \uc5c6\ub2e4\uace0 \uc124\uba85\ud574\uc694. JSONL\uc744 \uc77d\uc744 \ub54c\ub294 \ud30c\uc77c \uc804\uccb4\ub97c <code>json.load()<\/code>\uc5d0 \ub118\uae30\ub294 \ub300\uc2e0, \ud30c\uc77c\uc744 \uc904 \ub2e8\uc704\ub85c \uc21c\ud68c\ud558\uba70 <code>json.loads(line)<\/code>\uc744 \ud638\ucd9c\ud574\uc694.[1]<\/p>\n<p>JSON Lines \ud615\uc2dd\uc740 UTF-8 \uc778\ucf54\ub529, \uc904\ub9c8\ub2e4 \uc720\ud6a8\ud55c JSON \uac12, \uc904 \uad6c\ubd84\uc790 <code>\\n<\/code>\uc744 \uc0ac\uc6a9\ud574\uc694. <code>\\r\\n<\/code>\ub3c4 \uc9c0\uc6d0\ud558\uace0 \ub9c8\uc9c0\ub9c9 \uac12 \ub4a4\uc758 \uc904\ubc14\uafc8\uc740 \uac15\ub825\ud55c \uad8c\uc7a5 \uc0ac\ud56d\uc774\uc9c0 \ud544\uc218\ub294 \uc544\ub2c8\uc5d0\uc694. BOM\uc740 \ub123\uc9c0 \uc54a\uc544\uc694. \uac1d\uccb4\ub9cc \uac00\ub2a5\ud55c \ud615\uc2dd\ub3c4 \uc544\ub2c8\uc5d0\uc694. \ubc30\uc5f4\uc774\ub098 <code>null<\/code>\ub3c4 \ud5c8\uc6a9\ud558\uc9c0\ub9cc, <strong>\ube48 \uc904\uc740 \uc720\ud6a8\ud55c \uae30\ub85d\uc774 \uc544\ub2c8\uc5d0\uc694.<\/strong>[2]<\/p>\n<p>\uc608\ub97c \ub4e4\uc5b4 \uc774\ubca4\ud2b8 \ub85c\uadf8\ub77c\uba74 \uac1d\uccb4 \ud558\ub098\ub97c \uae30\ub85d \ud55c \uac74\uc73c\ub85c \uc815\ud560 \uc218 \uc788\uc5b4\uc694. \uc544\ub798 \ucf54\ub4dc\ub294 \uadf8 \uc6a9\ub3c4\uc5d0 \ub9de\ucdb0 \uac1d\uccb4\ub9cc \ud1b5\uacfc\uc2dc\ucf1c\uc694. \ubc30\uc5f4\uc744 \uac70\ubd80\ud558\ub294 \uac83\uc740 \uc774 \uc608\uc81c\uc758 \uc785\ub825 \uaddc\uce59\uc774\uace0 JSONL \uc790\uccb4\uc758 \uc81c\uc57d\uc740 \uc544\ub2c8\uc5d0\uc694.<\/p>\n<h2>\uc800\uc7a5\ud560 \ub54c\ub294 \uc904\ubc14\uafc8\uc744 \uc9c1\ub82c\ud654 \uacb0\uacfc \ub4a4\uc5d0 \ubd99\uc5ec\uc694<\/h2>\n<p><code>json.dumps()<\/code>\ub294 JSON \ubb38\uc790\uc5f4\uc744 \ub3cc\ub824\uc918\uc694. <code>ensure_ascii=False<\/code>\ub97c \uc8fc\uba74 \ud55c\uae00\uc774 \uc77d\uae30 \uc26c\uc6b4 \ud615\ud0dc\ub85c \ub0a8\uace0, \ubb38\uc790\uc5f4 \ub0b4\ubd80\uc758 \uac1c\ud589 \uac19\uc740 \uc81c\uc5b4 \ubb38\uc790\ub294 \uc5ec\uc804\ud788 \uc774\uc2a4\ucf00\uc774\ud504\ub3fc\uc694. \ub530\ub77c\uc11c \uba54\uc2dc\uc9c0\uc5d0 \uc2e4\uc81c \uac1c\ud589\uc774 \ub4e4\uc5b4 \uc788\uc5b4\ub3c4 \uc9c1\ub82c\ud654 \uacb0\uacfc\ub294 \uae30\ub85d \ud55c \uc904\uc5d0 \ub2f4\uaca8\uc694. \uc5ec\uae30\uc5d0\ub294 \uc5ec\ub7ec \uc904 \ub4e4\uc5ec\uc4f0\uae30\ub97c \ub9cc\ub4dc\ub294 <code>indent<\/code> \uc635\uc158\uc744 \ub123\uc9c0 \uc54a\uc558\uc5b4\uc694.[1]<\/p>\n<p>\uc77d\uae30 \ucabd\uc5d0\uc11c\ub294 \uc6d0\ubb38 \uc904\uc744 \uc9c0\uc6b0\uac70\ub098 \ub2e4\uc2dc \ubc88\ud638 \ub9e4\uae30\uc9c0 \uc54a\uace0 <code>enumerate(stream, 1)<\/code>\ub85c \uc704\uce58\ub97c \ubd99\uc5ec\uc694. \ubb38\ubc95 \uc624\ub958\ub294 <code>JSONDecodeError<\/code>, JSON\uc5d0 \uc5c6\ub294 <code>NaN<\/code> \uac19\uc740 \uc218\ub294 <code>parse_constant<\/code> \ucf5c\ubc31\uc5d0\uc11c \ubc1c\uc0dd\uc2dc\ud0a8 <code>ValueError<\/code>\ub85c \uad6c\ubd84\ud574\uc694. Python \uae30\ubcf8 \ub514\ucf54\ub354\ub294 \uc774\ub7f0 \ube44\ud45c\uc900 \uc218\ub97c \ud5c8\uc6a9\ud558\ubbc0\ub85c, \uc785\ub825\uc5d0\uc11c\ub3c4 \uac70\ubd80\ud558\ub824\uba74 \ubcc4\ub3c4 \ucc98\ub9ac\uac00 \ud544\uc694\ud574\uc694. \uc4f0\uae30 \ucabd\uc740 <code>allow_nan=False<\/code>\ub85c \ub9de\ucdc4\uc5b4\uc694.[1]<\/p>\n<p>\ub2e4\uc74c \ub0b4\uc6a9\uc744 <code>jsonl_demo.py<\/code>\ub85c \uc800\uc7a5\ud558\uba74 \ub3fc\uc694. \uc2e4\ud589 \uc608\uc81c\ub294 \uc784\uc2dc \ub514\ub809\ud130\ub9ac \uc548\uc5d0\uc11c\ub9cc \ud30c\uc77c\uc744 \ub9cc\ub4e4\uc5b4\uc694. <code>write_objects()<\/code>\uc758 <code>&quot;w&quot;<\/code> \ubaa8\ub4dc\ub294 \uae30\uc874 \ud30c\uc77c\uc744 \ube44\uc6b0\ubbc0\ub85c, \uc2e4\ubb34\uc5d0\uc11c \uc7ac\uc0ac\uc6a9\ud560 \ub54c\ub294 \uc6d0\ubcf8\uacfc \ub2e4\ub978 \ucd9c\ub825 \uacbd\ub85c\ub97c \uc9c0\uc815\ud574\uc57c \ud574\uc694.<\/p>\n<pre><code class=\"language-python\">import json\nimport platform\nfrom pathlib import Path\nfrom tempfile import TemporaryDirectory\n\n\ndef reject_constant(value):\n    raise ValueError(f&quot;non-JSON number: {value}&quot;)\n\n\ndef write_objects(path, rows):\n    # w truncates an existing file; use only a dedicated output path.\n    with path.open(&quot;w&quot;, encoding=&quot;utf-8&quot;, newline=&quot;\\n&quot;) as stream:\n        for row in rows:\n            text = json.dumps(row, ensure_ascii=False, allow_nan=False)\n            stream.write(text + &quot;\\n&quot;)\n\n\ndef read_objects(path):\n    with path.open(encoding=&quot;utf-8&quot;) as stream:\n        for number, line in enumerate(stream, 1):\n            try:\n                row = json.loads(line, parse_constant=reject_constant)\n            except json.JSONDecodeError:\n                print(f&quot;line {number}: invalid JSON&quot;)\n                continue\n            except ValueError:\n                print(f&quot;line {number}: invalid number&quot;)\n                continue\n            if not isinstance(row, dict):\n                print(f&quot;line {number}: object required&quot;)\n                continue\n            yield number, row\n\n\ndef main():\n    print(f&quot;Python {platform.python_version()}&quot;)\n    with TemporaryDirectory() as directory:\n        path = Path(directory) \/ &quot;events.jsonl&quot;\n        write_objects(path, [\n            {&quot;id&quot;: 1, &quot;message&quot;: &quot;\uc2dc\uc791\\n\uc644\ub8cc&quot;},\n            {&quot;id&quot;: 2, &quot;message&quot;: &quot;\uc800\uc7a5&quot;},\n        ])\n        print(&quot;written lines:&quot;, len(path.read_text(encoding=&quot;utf-8&quot;).splitlines()))\n        with path.open(&quot;a&quot;, encoding=&quot;utf-8&quot;, newline=&quot;\\n&quot;) as stream:\n            stream.write(&#x27;\\n{&quot;id&quot;: }\\n[]\\n{&quot;id&quot;: NaN}\\n{&quot;id&quot;: 3}\\n&#x27;)\n        try:\n            with path.open(encoding=&quot;utf-8&quot;) as stream:\n                json.load(stream)\n        except json.JSONDecodeError as error:\n            print(&quot;json.load:&quot;, error.msg)\n        accepted = []\n        for number, row in read_objects(path):\n            print(f&quot;line {number}: id={row[&#x27;id&#x27;]}&quot;)\n            accepted.append(row[&quot;id&quot;])\n        assert accepted == [1, 2, 3]\n        assert path.read_bytes().endswith(b&quot;\\n&quot;)\n        assert len(path.read_bytes().splitlines()) == 7\n        print(&quot;accepted:&quot;, accepted)\n\n\nif __name__ == &quot;__main__&quot;:\n    main()\n<\/code><\/pre>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-inline2.jpg\" alt=\"\ubb38\uc790\uc5f4 \ub0b4\ubd80 \uac1c\ud589\uc758 \uc774\uc2a4\ucf00\uc774\ud504\uc640 \uae30\ub85d \ub05d \uac1c\ud589\uc758 \uad6c\ubd84\uc744 \uc124\uba85\ud558\ub294 \uc0dd\uc131 \ub3c4\uc2dd\" width=\"1280\" height=\"720\" loading=\"lazy\"><\/figure>\n<h2>\uae68\uc9c4 \uc904 \ub4a4\uc758 \uc815\uc0c1 \uae30\ub85d\uae4c\uc9c0 \uc2e4\uc81c\ub85c \uc77d\ud614\uc5b4\uc694<\/h2>\n<p>Linux\uc758 Python 3.14.7\uc5d0\uc11c \uc704 \ud30c\uc77c\uc744 \uc2e4\ud589\ud588\uc5b4\uc694. \ucc98\uc74c\uc5d0\ub294 \uac1d\uccb4 \ub450 \uac1c\ub97c \uc4f0\uace0, \uc774\uc5b4\uc11c \ube48 \uc904\u00b7\uae68\uc9c4 \uac1d\uccb4\u00b7\ubc30\uc5f4\u00b7\ube44\ud45c\uc900 \uc218\ub97c \ub123\uc740 \uac1d\uccb4\u00b7\uc815\uc0c1 \uac1d\uccb4\ub97c \ucd94\uac00\ud588\uc5b4\uc694. \uc774\ub54c \uc6d0\ubb38 \ud30c\uc77c\uc740 \ubc14\uafb8\uc9c0 \uc54a\uace0 \uc77d\uae30 \uacb0\uacfc\ub9cc \ucd9c\ub825\ud574\uc694.<\/p>\n<pre><code class=\"language-sh\">python3 jsonl_demo.py\n<\/code><\/pre>\n<p>\uc2e4\uc81c \ucd9c\ub825\uc740 \ub2e4\uc74c\uacfc \uac19\uc544\uc694.<\/p>\n<pre><code class=\"language-text\">Python 3.14.7\nwritten lines: 2\njson.load: Extra data\nline 1: id=1\nline 2: id=2\nline 3: invalid JSON\nline 4: invalid JSON\nline 5: object required\nline 6: invalid number\nline 7: id=3\naccepted: [1, 2, 3]\n<\/code><\/pre>\n<p>\uc804\uccb4 \ud30c\uc77c\uc744 <code>json.load()<\/code>\ub85c \uc77d\uc740 \uc2dc\ub3c4\ub294 <code>Extra data<\/code>\ub85c \uc2e4\ud328\ud588\uc5b4\uc694. \uc904 \ub2e8\uc704 \uc77d\uae30\ub294 3\u00b74\ubc88\uc9f8 \uc904\uc758 \ubb38\ubc95 \uc624\ub958, 5\ubc88\uc9f8 \uc904\uc758 \uac1d\uccb4\ud615 \uc704\ubc18, 6\ubc88\uc9f8 \uc904\uc758 \ube44\ud45c\uc900 \uc218\ub97c \uac01\uac01 \ubcf4\uace0\ud558\uace0 7\ubc88\uc9f8 \uc904\uae4c\uc9c0 \uc9c4\ud589\ud588\uc5b4\uc694. \uccab \uae30\ub85d\uc758 \uba54\uc2dc\uc9c0\uc5d0 \ub4e4\uc5b4 \uc788\ub358 \uac1c\ud589\ub3c4 \ubb3c\ub9ac\uc801\uc778 \uc0c8 \uae30\ub85d\uc73c\ub85c \uac08\ub77c\uc9c0\uc9c0 \uc54a\uc544, \ucd5c\ucd08 \uc800\uc7a5 \uc904 \uc218\ub294 2\ub85c \ub0a8\uc558\uc5b4\uc694. \ub9c8\uc9c0\ub9c9 \uc904\ubc14\uafc8\uacfc \uc804\uccb4 7\uc904 \uc5ec\ubd80\ub294 \ucf54\ub4dc\uc758 <code>assert<\/code>\ub85c \uac80\uc0ac\ud588\uc5b4\uc694.<\/p>\n<p>\uc774 \uc608\uc81c\uc758 <code>print()<\/code>\ub294 \uc124\uba85\uc6a9\uc774\uc5d0\uc694. \uc2e4\uc81c \ubc30\uce58\uc5d0\uc11c\ub294 \ud30c\uc77c\uba85\u00b7\uc904 \ubc88\ud638\u00b7\uc2e4\ud328 \uc885\ub958\ub97c \ubcc4\ub3c4 \uc624\ub958 \ub85c\uadf8\uc5d0 \uc800\uc7a5\ud558\uba74 \uc7ac\ucc98\ub9ac \ub300\uc0c1\uc744 \ucc3e\uae30 \uc26c\uc6cc\uc694. \uc6d0\ubb38\uc5d0 \uac1c\uc778\uc815\ubcf4\ub098 \uc778\uc99d \uc815\ubcf4\uac00 \uc11e\uc77c \uc218 \uc788\uc73c\ub2c8, \uc2e4\ud328\ud55c \uc904 \uc804\uccb4\ub97c \ub85c\uadf8\uc5d0 \ubcf5\uc81c\ud558\ub294 \ubc29\uc2dd\uc740 \ud53c\ud558\ub294 \ucabd\uc73c\ub85c \uc124\uacc4\ud588\uc5b4\uc694.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-inline3.jpg\" alt=\"\ubcf8\ubb38 \uc2e4\ud589 \uc608\uc81c\uc758 3\u00b74\uc904 \ubb38\ubc95 \uc624\ub958, 5\uc904 \uac1d\uccb4\ud615 \uc704\ubc18, 6\uc904 \ube44\ud45c\uc900 \uc218\ub97c \ubcf4\uace0\ud55c \ub4a4 7\uc904 \uc815\uc0c1 \uae30\ub85d\uc744 \uc77d\ub294 \uc0dd\uc131 \ub3c4\uc2dd\" width=\"1280\" height=\"720\" loading=\"lazy\"><\/figure>\n<h2>\uac74\ub108\ub6f0\ub294 \uc815\ucc45\uacfc \uac80\uc99d \uc644\ub8cc\ub294 \ub2ec\ub77c\uc694<\/h2>\n<p>\uc774 \ucf54\ub4dc\ub294 \uc77c\ubd80 \ub85c\uadf8\uac00 \uae68\uc838\ub3c4 \ub098\uba38\uc9c0\ub97c \ubd84\uc11d\ud558\ub824\ub294 \uc0c1\ud669\uc5d0 \ub9de\uc544\uc694. \uc815\uc0b0\uc774\ub098 \uc8fc\ubb38\ucc98\ub7fc \ud55c \uac74\uc758 \ub204\ub77d\ub3c4 \ud5c8\uc6a9\ud558\uc9c0 \uc54a\ub294 \uc791\uc5c5\uc774\ub77c\uba74 \uac19\uc740 \uc704\uce58\uc5d0\uc11c \uc608\uc678\ub97c \ub2e4\uc2dc \ubc1c\uc0dd\uc2dc\ud0a4\uace0 \uc791\uc5c5\uc744 \uc911\ub2e8\ud558\ub294 \uc815\ucc45\uc774 \ub354 \uc801\uc808\ud574\uc694. \ub458 \uc911 \uc5b4\ub290 \ucabd\uc774\ub4e0 \uc2e4\ud328 \uac74\uc218\ub97c \ub0a8\uaca8\uc57c \uc815\uc0c1 \uac74\uc218\ub9cc \ubcf4\uace0 \uc804\uccb4 \uc131\uacf5\uc73c\ub85c \uc624\ud574\ud558\uc9c0 \uc54a\uc544\uc694.<\/p>\n<p>\uc5ec\uae30\uc11c \ud1b5\uacfc\ub294 JSON \ubb38\ubc95\uacfc \ucd5c\uc0c1\uc704 \uac1d\uccb4\ud615 \uac80\uc0ac\ub97c \ud1b5\uacfc\ud588\ub2e4\ub294 \uc758\ubbf8\uc608\uc694. \ud544\uc218 \ud0a4, \ub0a0\uc9dc \ud615\uc2dd, \uac1d\uccb4 \uc548\uc758 \uac12\uae4c\uc9c0 \uac80\uc99d\ud558\uc9c0\ub294 \uc54a\uc544\uc694. \uc0d8\ud50c \ucd9c\ub825\ubd80\ub3c4 <code>id<\/code>\uac00 \uc788\ub294 \uc785\ub825\uc744 \uc804\uc81c\ub85c \ud574\uc694. UTF-8 \ub514\ucf54\ub529 \uc624\ub958\uc640 \ud30c\uc77c \uc811\uadfc \uc624\ub958\ub294 \uc774 \ubc18\ubcf5\ubb38\uc5d0\uc11c \ubcf5\uad6c\ud558\uc9c0 \uc54a\uace0 \ud638\ucd9c\uc790\uc5d0\uac8c \uc804\ud30c\ub3fc\uc694. \ubd88\ud2b9\uc815 \uc785\ub825\uc744 \ub2e4\ub8f0 \ub54c\ub294 \ud30c\uc77c\u00b7\uc904 \ud06c\uae30 \uc81c\ud55c\ub3c4 \ubcc4\ub3c4\ub85c \uc124\uacc4\ud574\uc57c \ud574\uc694. Python \ubb38\uc11c \uc5ed\uc2dc \uc2e0\ub8b0\ud560 \uc218 \uc5c6\ub294 JSON\uc774 CPU\uc640 \uba54\ubaa8\ub9ac\ub97c \ud06c\uac8c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4\uace0 \uacbd\uace0\ud574\uc694.[1]<\/p>\n<p>\uc904 \ub2e8\uc704\ub85c \uc77d\uc5b4\ub3c4 \ub4a4\uc5d0\uc11c <code>list(read_objects(path))<\/code>\ub85c \uc804\ubd80 \ubaa8\uc73c\uba74 \ub808\ucf54\ub4dc\uac00 \uba54\ubaa8\ub9ac\uc5d0 \uc313\uc5ec\uc694. \uc2a4\ud2b8\ub9ac\ubc0d\uc774 \ubaa9\uc801\uc774\uba74 \uc608\uc81c\uc758 <code>for<\/code> \ubb38 \uc548\uc5d0\uc11c \uc800\uc7a5\ud558\uac70\ub098 \uc9d1\uacc4\ud558\ub294 \ud750\ub984\uc744 \uc720\uc9c0\ud558\uba74 \ub3fc\uc694. \uba85\ub839\uc904 \uc635\uc158\uc73c\ub85c \uc785\ub825 \uacbd\ub85c\ub97c \ubc1b\ub294 \ubd80\ubd84\uc740 \uc55e\uc11c \ub2e4\ub8ec <a href=\"https:\/\/danlabs.kr\/?p=1951\" target=\"_blank\" rel=\"noopener noreferrer\">Python argparse \uc608\uc81c<\/a>\uc640 \uc774\uc5b4 \ubd99\uc77c \uc218 \uc788\uc5b4\uc694. \ud30c\uc77c \ud615\uc2dd\uc740 \uae30\ub85d\uc758 \uacbd\uacc4\ub97c \uc815\ud558\uace0, \ub204\ub77d\uc744 \ud5c8\uc6a9\ud560\uc9c0 \uc5ec\ubd80\ub294 \uadf8 \uae30\ub85d\uc744 \uc4f0\ub294 \uc5c5\ubb34\uac00 \uc815\ud574\uc694.<\/p>\n<p><strong>Sources<\/strong><\/p>\n<ul>\n<li>[1] <a href=\"https:\/\/docs.python.org\/3\/library\/json.html\" target=\"_blank\" rel=\"noopener noreferrer\">Python documentation \u2014 json<\/a><\/li>\n<li>[2] <a href=\"https:\/\/jsonlines.org\" target=\"_blank\" rel=\"noopener noreferrer\">JSON Lines \u2014 format requirements<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Python JSONL\uc744 \uc904 \ub2e8\uc704\ub85c \uc77d\uace0 \uc4f0\ub294 \uc2e4\ud589 \uc608\uc81c\uc608\uc694. UTF-8 \uc800\uc7a5, \uc6d0\ub798 \uc904 \ubc88\ud638 \uc720\uc9c0, \ube48 \uc904\uacfc \uae68\uc9c4 JSON\u00b7NaN \ucc98\ub9ac, \uc624\ub958 \ub4a4 \uc815\uc0c1 \uae30\ub85d\uc744 \uacc4\uc18d \uc77d\ub294 \uc815\ucc45\uc744 \uc124\uba85\ud574\uc694.<\/p>\n","protected":false},"author":1,"featured_media":3069,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-3073","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev"],"featured_image_urls":{"full":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-feat.jpg",1280,720,false],"thumbnail":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-feat-150x150.jpg",150,150,true],"medium":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-feat-300x169.jpg",300,169,true],"medium_large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-feat-768x432.jpg",640,360,true],"large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-feat-1024x576.jpg",640,360,true],"1536x1536":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-feat.jpg",1280,720,false],"2048x2048":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-feat.jpg",1280,720,false],"morenews-large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-feat.jpg",825,464,false],"morenews-medium":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-feat.jpg",590,332,false],"danlabs-list-small":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-feat-366x190.jpg",366,190,true],"danlabs-list-retina":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/python-jsonl-line-errors-20261114-feat.jpg",1280,720,false]},"author_info":{"display_name":"DanLABs","author_link":"https:\/\/danlabs.kr\/author\/hello-danlabs-kr"},"category_info":"<a href=\"https:\/\/danlabs.kr\/?cat=19\" rel=\"category\">\uac1c\ubc1c<\/a>","tag_info":"\uac1c\ubc1c","comment_count":"2","_links":{"self":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/3073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3073"}],"version-history":[{"count":1,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/3073\/revisions"}],"predecessor-version":[{"id":3074,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/3073\/revisions\/3074"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/media\/3069"}],"wp:attachment":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}