CSVをJSONに変換

“CSVをJSONに変換” で定義されたデータ表現、形式、または単位間の変換を行います。

入力: テキスト結果: 構造化 JSON

テキスト入力

実行すると結果が表示されます

使用例

Convert a support-ticket export containing commas, quotes and a multiline note

Demonstrate why splitting on commas or newlines corrupts a valid CSV record.

入力

ticketsummarynotes
00123Refund, partialCustomer said "please check" Second line

Download input file

Expected answer

JSON
[
    {
        "ticket": "00123",
        "summary": "Refund, partial",
        "notes": "Customer said \"please check\"\r\nSecond line"
    }
]
セル区切り文字
,
行区切り文字
\r\n
形式
Array of dictionaries
A compact feature-flag record

入力

compactschema
true0

Download input file

Expected answer

JSON
[
    {
        "compact": "true",
        "schema": "0"
    }
]
セル区切り文字
,
行区切り文字
\r\n
形式
Array of dictionaries
A UTF-8 café label

入力

namecity
caféParis

Download input file

Expected answer

JSON
[
    {
        "name": "café",
        "city": "Paris"
    }
]
セル区切り文字
,
行区切り文字
\r\n
形式
Array of dictionaries
A negative sensor reading

入力

stationcelsius
demo-12

Download input file

Expected answer

JSON
[
    {
        "station": "demo",
        "celsius": "-12"
    }
]
セル区切り文字
,
行区切り文字
\r\n
形式
Array of dictionaries
A decimal checkout amount

入力

amountcurrency
12.5EUR

Download input file

Expected answer

JSON
[
    {
        "amount": "12.5",
        "currency": "EUR"
    }
]
セル区切り文字
,
行区切り文字
\r\n
形式
Array of dictionaries
A missing avatar

入力

useravatar
demo

Download input file

Expected answer

JSON
[
    {
        "user": "demo",
        "avatar": ""
    }
]
セル区切り文字
,
行区切り文字
\r\n
形式
Array of dictionaries
Array of arrays

入力

ABCDEF
123456
,;'"
"hello"a"1multi lineend

Download input file

Expected answer

JSON
[
    [
        "A",
        "B",
        "C",
        "D",
        "E",
        "F"
    ],
    [
        "1",
        "2",
        "3",
        "4",
        "5",
        "6"
    ],
    [
        ",",
        ";",
        "'",
        "\"",
        "",
        ""
    ],
    [
        "\"hello\"",
        "a\"1",
        "multi\r\nline",
        "",
        "",
        "end"
    ]
]
セル区切り文字
,
行区切り文字
形式
Array of arrays
Array of dictionaries

入力

ABCDEF
123456
,;'"
"hello"a"1multi lineend

Download input file

Expected answer

JSON
[
    {
        "A": "1",
        "B": "2",
        "C": "3",
        "D": "4",
        "E": "5",
        "F": "6"
    },
    {
        "A": ",",
        "B": ";",
        "C": "'",
        "D": "\"",
        "E": "",
        "F": ""
    },
    {
        "A": "\"hello\"",
        "B": "a\"1",
        "C": "multi\r\nline",
        "D": "",
        "E": "",
        "F": "end"
    }
]
セル区切り文字
,
行区切り文字
形式
Array of dictionaries

関連ツール

データ形式

操作の参考資料

元の技術文書を見る (English)