Open jimmyz opened 3 years ago
When serializing a SourceDescription object, the descriptions key is serialized as description (singular).
descriptions
description
Example:
<?php require 'vendor/autoload.php'; use Gedcomx\Gedcomx; use Gedcomx\Source\SourceDescription; use Gedcomx\Common\TextValue; $sD = new SourceDescription(); $sD->setId('c1'); $treeTitle = new TextValue(); $treeTitle->setValue("Test Title"); $treeDescription = new TextValue(); $treeDescription->SetValue("Test Description); $sD->setTitles(array($treeTitle)); $sD->setDescriptions(array($treeDescription)); echo $sD->toJson(); exit; ?>
Produces
{ "id": "c1", "titles": [ { "value": "Test Title" } ], "description": [ { "value": "Test Description" } ] }
When serializing a SourceDescription object, the
descriptions
key is serialized asdescription
(singular).Example:
Produces