Download the resulting contacts.vcf file.
Raw JSON data is machine-readable and flexible, but it is useless on a phone. A VCF file is the universal standard for importing contacts into smartphones (iOS/Android), email clients (Outlook, Gmail), and CRMs.
"contact":"personal":"first":"Jane","work":"phone":"555-0001" Flatten the JSON first using a tool like jq (command line): jq 'name: .contact.personal.first, phone: .contact.work.phone' input.json > output.json Then convert the flattened JSON to VCF. Bulk Converting Multiple Files If you have 100 separate JSON files, each with one contact, use a terminal script (macOS/Linux): json to vcf converter
["name":"Alice Smith","phone":"+44 7700 123456","name":"Bob Jones","phone":"+44 7711 654321"] Go to a trusted converter (e.g., convertjson.com/json-to-vcard ).
import json import vobject with open('contacts.json', 'r') as f: data = json.load(f) Create VCF file vcf_file = open('output.vcf', 'w') Download the resulting contacts
vcf_file.close() print("Conversion complete: output.vcf")
for item in data: vcard = vobject.vCard() vcard.add('fn').value = item.get('name', 'No Name') if 'phone' in item: vcard.add('tel').value = item['phone'] if 'email' in item: vcard.add('email').value = item['email'] vcf_file.write(vcard.serialize()) Ensure it is a valid array of objects:
Prepare your JSON. Ensure it is a valid array of objects: