nfdi4plants / ARCtrl

Library for management of Annotated Research Contexts (ARCs) using an in-memory representation and runtime-agnostic contract systems.
MIT License
16 stars 8 forks source link

Make use of @id referencing in isa json writing #392

Closed HLWeil closed 4 months ago

HLWeil commented 4 months ago

Description

ISA-json writer functions now contain useIDReferencing flag, which will lead to every object in the json file being written only once. For every other appearance of the same object, an object just containing its @id will be written in its stead.

Usage:

fsharp

open ARCtrl
open ARCtrl.Json

ArcStudy.toISAJsonString(useIDReferencing = true) study

javascript

import { JsonController } from "./src/ARCtrl/Json.js";

JsonController.Study.toISAJsonString(study, void 0, void 0, true)

python

from src.ARCtrl.json import JsonController

JsonController.Study().to_isajson_string(study, None, None, True)

@Freymaurer @xiaoranzhou

324