{"id":18546562,"url":"https://github.com/saveourtool/serialization-adapters","last_synced_at":"2026-03-03T16:36:12.307Z","repository":{"id":43062727,"uuid":"447325210","full_name":"saveourtool/serialization-adapters","owner":"saveourtool","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-21T10:04:47.000Z","size":133,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-10T12:50:17.600Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saveourtool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-12T18:18:37.000Z","updated_at":"2022-05-27T18:26:15.000Z","dependencies_parsed_at":"2022-09-09T16:52:00.126Z","dependency_job_id":null,"html_url":"https://github.com/saveourtool/serialization-adapters","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/saveourtool/serialization-adapters","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saveourtool%2Fserialization-adapters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saveourtool%2Fserialization-adapters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saveourtool%2Fserialization-adapters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saveourtool%2Fserialization-adapters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saveourtool","download_url":"https://codeload.github.com/saveourtool/serialization-adapters/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saveourtool%2Fserialization-adapters/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30051978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T15:26:47.567Z","status":"ssl_error","status_checked_at":"2026-03-03T15:26:17.132Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T20:25:56.688Z","updated_at":"2026-03-03T16:36:12.274Z","avatar_url":"https://github.com/saveourtool.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kotlin Serialization Adapters\nAdapters and converters for different serialization types. For example: from JSON to CSV, from TOML to YML, from CSV to SARIF, etc.\nYou simply need to provide the mapping **schema** and kotlinx **serialization library** for it.\n\n## Project's initial idea\nInitially, we wanted simply to create a small tool that will be able to convert custom formats that have a support in [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization/tree/master/formats) to [SARIF](https://docs.oasis-open.org/sarif/sarif/v2.0/sarif-v2.0.html) format.\n\nLater we thought that it can be useful for other developers to have a common adapter for different serialization types.\n\n## Adding a custom format\nIf you would like to use this library as cli-app:\n1) Implement `@Serializable` data class that will be used for deserialization of an input\n2) Implement a subclass of `AdapterProxy`. Preferable way is to use `SarifAdapter` factory method, but if you need more granular control of functionality, you can extend classes directly.\n3) Create a Service Provider Interface file `META-INF/services/org.cqfn.save.adapter.AdapterProxy`\n\nIn case you plan to have an adapter as a library:\n1) Implement `@Serializable` data classes that will be used for deserialization and serialization of an input\n2) ??? (set the INPUT and OUTPUT formats and proper libraries will be automatically added by the adapter)\n3) Provide these classes to the `KxSerializationAdapter`\n\n## Examples of usage\nWe have prepared some examples that can be found [here](https://github.com/analysis-dev/serialization-adapters/tree/main/examples).\n\n## How it works:\n\u003cimg src=\"/flow.png\" width=\"700px\"/\u003e\n\n## Running the cli application (stdin - stdout)\nPrerequisites: Java.\n\n1) Put the fat-jar with your custom type into the same directory with `save-adapters.jar` \n \n2) Then write serialized representation of your data into app's stdin:\n```bash\ncat my-data.json | java -cp * org.cqfn.save.adapter.RunnerKt\n```\n\n## Running the cli application (file input - file output)\n1) Put the `fat-jar` with your custom type into the same directory with `save-adapters.jar`\n\n2) Run the following command to convert your file:\n```bash\njava -cp * org.cqfn.save.adapter.RunnerKt \"/full/path/my-file-input\" \"/full/path/my-file-output.sarif\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaveourtool%2Fserialization-adapters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaveourtool%2Fserialization-adapters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaveourtool%2Fserialization-adapters/lists"}