An Saor- Fheidhmchlár is Fearr Tiontaire CSV go JSON
Cas rónna CSV isteach i sraith glan JSON de rudaí - saor in aisce, greamaigh nó uaslódáil, níl aon rud stóráilte.
Conas a oibríonn sé
- Soláthar CSV. Greamaigh do théacs CSV nó uaslódáil comhad.csv.
- Socraigh Roghanna. Abair cé acu an bhfuil an chéad ró ceannteideal agus roghnaigh an deighilteoir (camóg, táb, …).
- Faigh JSON. Cóipeáil an eagar JSON formáidithe, nó íoslódáil é mar chomhad.json.
Maidir leis an uirlis seo
CSV to JSON turns tabular CSV data into a JSON array you can use in code or an API. Paste the CSV or upload a.csv file, tell it whether the first row is a header, and pick the delimiter if it is not a comma. With a header row, every line becomes a JSON object keyed by the column names; without one, every line becomes a array. The output is pretty-printed and ready to copy or download. It parses everything in the request and stores nothing.
Cad a úsáideann daoine é le haghaidh
- Fotha sonraí scarbhileog isteach i API nó app
- Tiontaigh CSV easpórtáilte go JSON le haghaidh cód
- Cas liosta teagmhála nó táirge i JSON struchtúrtha
- Fréamhshamhail le sonraí fíor gan parsálaí a scríobh
API Forbróra
Uathoibrigh an uirlis seo ó do chód féin. Seol iarratas POST chuig an gcríochphointe thíos agus faigh an toradh céanna a tháirgeann an uirlis gréasáin. Tá sé ráta-teoranta in aghaidh IP agus ní gá aon síniú - eochracha API do theorainneacha níos airde ag teacht.
https://best.free/api/tools/csv-to-json/
| Paraiméadair | Sampla | Riachtanach | Nótaí |
|---|---|---|---|
text |
name,age\nAda,36 |
Tá | CSV text (or upload a file on the web form). |
delimiter |
, |
& Ná Sábháil | Field delimiter (use "tab" for TSV). |
header |
True |
& Ná Sábháil | First row is a header. |
curl -X POST https://best.free/api/tools/csv-to-json/ \
-H 'Content-Type: application/json' \
-d '{"text": "name,age\\nAda,36", "delimiter": ",", "header": true}'
import requests
r = requests.post(
"https://best.free/api/tools/csv-to-json/",
json={"text": "name,age\nAda,36", "delimiter": ",", "header": True},
)
print(r.json())
const r = await fetch("https://best.free/api/tools/csv-to-json/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: "name,age\nAda,36", delimiter: ",", header: true }),
});
const data = await r.json();
console.log(data);
Freagra: JSON with the converted array in "json".
{"ok": true, "json": "[\n {\"name\": \"Ada\", \"age\": \"36\"}\n]"}