JSON से CSV
Flat JSON records को CSV में export करें और उसी example में quoting और column order का परीक्षण करें।
Flat JSON records को CSV में export करें और उसी example में quoting और column order का परीक्षण करें।
उपयोग के चरण
- id, name और note वाले दो records का array लोड करें।
- CSV में convert करें और result को plain text editor में खोलें।
- Header पढ़ें और embedded comma तथा quotes पर ध्यान देते हुए दोनों rows की तुलना करें।
व्यावहारिक उदाहरण
इनपुट
[{"id":"001","name":"林, Mei","note":"She said \"Hi\""},{"note":null,"id":"002","name":"Omar"}]अपेक्षित परिणाम
id,name,note
001,"林, Mei","She said ""Hi"""
002,Omar,परिणाम की जाँच
Header id,name,note ही रहता है, और Omar की row में अंतिम cell खाली रहता है।