0

多くの行のテキストを含むテキスト ファイルがある場合、それを JSON Lines 形式に変換するためのすぐに利用できる方法はありますか?

テキスト ファイルの例には次のものが含まれます。

This is the first line.
This is the "second" line.
This is the \third/ line.
This is the {fourth} line;

JSON 行 (.jsonl) ファイルの例:

{"text": "This is the first line."}
{"text": "This is the \"second\" line."}
{"text": "This is the \\third\/ line."}
{"text": "This is the {fourth} line;"}

JSONの特殊文字をエスケープしながら、このように線形変換する簡単な方法があることを願っていました。これを実行できる Mac 用のオンライン ツールまたは (CLI) ツールはありますか?

4

1 に答える 1