Skip to content

Structured property support (VCARD.N, VCARD.ADR) #3

Open

Description

@PhilflowIO

Problem

Some properties have structured values with multiple components. Currently, these are treated as simple strings which may not correctly update all components.

Examples

VCARD.N (Name)

Format: Family;Given;Additional;Prefix;Suffix

N:Doe;John;Michael;Dr.;Jr.

VCARD.ADR (Address)

Format: ;;Street;City;Region;PostalCode;Country

ADR;TYPE=WORK:;;123 Main St;Berlin;;10115;Germany

Current Behavior

// May not handle structure correctly
updateFields(vcard, {
  'N': 'Smith;Jane'  // Missing components
});

Desired Behavior

// Option 1: Accept full structured string
updateFields(vcard, {
  'N': 'Smith;Jane;Marie;;'
});

// Option 2: Accept object (more complex)
updateFields(vcard, {
  'N': {
    family: 'Smith',
    given: 'Jane',
    additional: 'Marie'
  }
});

Philosophy Conflict

Option 2 adds semantic understanding which conflicts with field-agnostic approach. Option 1 keeps it simple but requires user to understand structure.

Workaround

Provide full structured value as string:

// User must know the format
updateFields(vcard, {
  'N': 'Smith;Jane;Marie;;',  // Family;Given;Additional;Prefix;Suffix
  'ADR': ';;123 Main St;Berlin;;10115;Germany'
});

Recommendation

Document the structure in README, keep implementation simple. Users who need structured editing can use ical.js directly.

Related

  • RFC 6350 Section 6.2.2 (N)
  • RFC 6350 Section 6.3.1 (ADR)
  • RFC 6350 Section 3.3 (Value Data Types)

Activity

  1. added
    enhancement
    on Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions