gedcom_codec 0.0.2 copy "gedcom_codec: ^0.0.2" to clipboard
gedcom_codec: ^0.0.2 copied to clipboard

Dart library to serialize, deserialize (parse) GEDCOM strings.

GEDCOM Codec #

Codec to serialize/deserialize GEDCOM strings.

Codec works on most GEDCOM formats since it validates only lines format and levels nesting.

Usage #

import 'package:gedcom_codec/gedcom_codec.dart';

void main() {
  // GEDCOM parsing:
  final document = GedcomCodec().decode(gedcomString);
  //           or  GedcomDecoder().convert(gedcomString);

  // GEDCOM usage:
  final individuals = document.getAllByTag('INDI');
  for (final individual in individuals) {
    print(
      'Individual ${individual.xref}: '
      '${individual.getByTagOrNull('NAME')?.lineVal}',
    );
  }
  
  // GEDCOM encoding:
  final encodedGedcomString = 
        GedcomCodec().encode(gedcomString);
  // or GedcomEncoder().convert(gedcomString, indent: '', eol: '\n');
  print(encodedGedcomString)
}

Additional information #

Links:

GEDCOM files sources:

NOTICE:
This work comprises, is based on, or is derived from the FAMILYSEARCH GEDCOM™
Specification, © 1984-2025 Intellectual Reserve, Inc. All rights reserved.
“FAMILYSEARCH GEDCOM™” and “FAMILYSEARCH®” are trademarks of Intellectual
Reserve, Inc. and may not be used except as allowed by the Apache 2.0 license that governs this
work or as expressly authorized in writing and in advance by Intellectual Reserve, Inc.
1
likes
160
points
31
downloads

Publisher

verified publishermichaeldark.dev

Weekly Downloads

Dart library to serialize, deserialize (parse) GEDCOM strings.

Repository (GitHub)

Topics

#gedcom #codec #parser

Documentation

API reference

License

MIT (license)

Dependencies

collection, meta

More

Packages that depend on gedcom_codec