PHPackages                             ongoing/swissrets-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. ongoing/swissrets-sdk

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

ongoing/swissrets-sdk
=====================

A collection of classes to easier build SwissRETS JSON and XML files.

0.3.1(3mo ago)01.6k↓43.2%1MITPHPPHP &gt;=8.2

Since Aug 15Pushed 3mo agoCompare

[ Source](https://github.com/ongoing/swissrets-sdk)[ Packagist](https://packagist.org/packages/ongoing/swissrets-sdk)[ Docs](https://github.com/ongoing/swissrets-sdk)[ RSS](/packages/ongoing-swissrets-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (5)Used By (0)

Ongoing SwissRETS SDK
=====================

[](#ongoing-swissrets-sdk)

Ongoing SwissRETS SDK is a supporting library for easier creation of [SwissRETS files](https://swissrets.ch/) (JSON and XML).

Installation
------------

[](#installation)

```
composer require "ongoing/swissrets-sdk"

```

Usage
-----

[](#usage)

```
use Ongoing\Swissrets\Dto\SwissRetsExportDto;
use Ongoing\Swissrets\Validator\SwissRetsValidator;

$exportDto = new SwissRetsExportDto(
    generatorName   : 'Test Export',
    generatorVersion: '1.0'
);

/*
 * Create and add propertyDtos to $exportDto
 */

// Validate DTO
SwissRetsValidator::validateExportDto($exportDto);

// Generate JSON
$json = $exportDto->generateJson();

// Generate XML
$xml = $exportDto->generateXml();
```

Consider looking at the `Ongoing\Swissrets\Dto\ExampleBuilder` for reference.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance78

Regular maintenance activity

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~52 days

Total

4

Last Release

118d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/497943?v=4)[ongoing GmbH](/maintainers/ongoing)[@ongoing](https://github.com/ongoing)

---

Top Contributors

[![seizan8](https://avatars.githubusercontent.com/u/32196755?v=4)](https://github.com/seizan8 "seizan8 (11 commits)")[![dariobednarski](https://avatars.githubusercontent.com/u/10696790?v=4)](https://github.com/dariobednarski "dariobednarski (7 commits)")

---

Tags

jsonxmlstandardswitzerlandswissretsxml-structurerealestatestandards

### Embed Badge

![Health badge](/badges/ongoing-swissrets-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/ongoing-swissrets-sdk/health.svg)](https://phpackages.com/packages/ongoing-swissrets-sdk)
```

###  Alternatives

[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k135.8M851](/packages/jms-serializer)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[dragon-code/codestyler

A tool to automatically fix Coding Style Standards issues by The Dragon Code.

291.8M16](/packages/dragon-code-codestyler)[akrabat/rka-content-type-renderer

Render an array to a JSON/XML/HTML PSR-7 Response based on a PSR-7 Request's Accept header.

40443.2k1](/packages/akrabat-rka-content-type-renderer)[laminas/laminas-xml2json

Provides functionality for converting XML to JSON, optionally including XML attributes

14408.5k13](/packages/laminas-laminas-xml2json)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
