SwissRETS is a swiss real estate transaction standard. It aims to solve data exchange between real estate software and platforms. It's meant to be a replacement for old and static formats like the widely used IDX 3.01 in Switzerland.
This repository is a fork of the XML-based repository https://github.com/qualipool/swissrets. The primary development of the standard will take place here, while we aim to maintain the XML standard without introducing new features.
Check out the schema documentation.
- Add the package with
npm add @qualipool/swissrets-json
import {
validateSwissRets,
SwissRetsInventory
} from '@qualipool/swissrets-json';
// validating a SwissRETS JSON string
const stringValue = `{
"created": "2023-03-23T08:11:12Z",
"generator": {
"name": "CASAGATEWAY",
"version": "0.9"
},
"properties": []
}`;
const result = validateSwissRets(Value);
console.log(result);
// validating a SwissRETS JSON object
const srObject: SwissRetsInventory = {
created: '2023-03-23T08:11:12Z',
generator: {
name: 'CASAGATEWAY',
version: '0.9'
},
properties: []
};
result = validateSwissRets(srObject);
console.log(result);
Please review and follow the Code of conduct.
Please report any unacceptable behaviour to the maintainers.
Find the guidelines for the migration from the XML standard in the Migration Guide.