Json To Vcf Converter [ 2024 ]

Download the resulting contacts.vcf file.

"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):

Prepare your JSON. Ensure it is a valid array of objects: json to vcf converter

You have a JSON array of 50 customer records from your e-commerce store.

[ "name": "John Doe", "phone": "+1-555-123-4567", "email": "john.doe@example.com", "company": "Acme Inc." ] APIs, databases, web storage. Weakness: Cannot be imported directly into a phone's address book. What is VCF (vCard)? VCF is a standard file format for electronic business cards. Each contact begins with BEGIN:VCARD and ends with END:VCARD . A standard VCF entry looks like this: Download the resulting contacts

Paste your JSON into the left input box.

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:

import json import vobject with open('contacts.json', 'r') as f: data = json.load(f) Create VCF file vcf_file = open('output.vcf', 'w')