{"id":13804636,"url":"https://github.com/jacob-carlborg/orange","last_synced_at":"2025-05-13T17:32:46.551Z","repository":{"id":141111787,"uuid":"2217276","full_name":"jacob-carlborg/orange","owner":"jacob-carlborg","description":"A serialization library for the D programming language.","archived":false,"fork":false,"pushed_at":"2020-03-21T19:06:05.000Z","size":913,"stargazers_count":71,"open_issues_count":19,"forks_count":15,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-04T01:03:51.831Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jacob-carlborg.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2011-08-16T18:03:15.000Z","updated_at":"2023-10-17T18:18:49.000Z","dependencies_parsed_at":"2024-01-03T01:20:10.748Z","dependency_job_id":"7a742502-e425-4689-936e-0126f7b6108e","html_url":"https://github.com/jacob-carlborg/orange","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-carlborg%2Forange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-carlborg%2Forange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-carlborg%2Forange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-carlborg%2Forange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacob-carlborg","download_url":"https://codeload.github.com/jacob-carlborg/orange/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225247925,"owners_count":17444141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-08-04T01:00:51.614Z","updated_at":"2024-11-18T20:32:14.638Z","avatar_url":"https://github.com/jacob-carlborg.png","language":"D","funding_links":[],"categories":["Data serialization"],"sub_categories":["XML"],"readme":"# Orange [![Build Status](https://travis-ci.org/jacob-carlborg/orange.svg?branch=master)](https://travis-ci.org/jacob-carlborg/orange) [![Go to orange](https://img.shields.io/dub/v/orange.svg)](https://code.dlang.org/packages/orange)\n\nOrange is a serialization library for the D programming language. It supports D1/Tango and D2/Phobos.\nIt can serialize most of the available types in D, including third party types and can serialize\nthrough base class references. It supports fully automatic serialization of all supported types\nand also supports several ways to customize the serialization process. Orange has a separate front end\n(the serializer) and back end (the archive) making it possible for the user to create new archive\ntypes that can be used with the existing serializer.\n\n## Building\n\n### Requirements\n\n* Dub http://code.dlang.org/download\n\n### Building\n\n1. Install all requirements\n1. Clone the repository\n1. Run `dub build`\n\n## Unit Tests\n\nRun the unit tests using Dub `dub test`\n\n## Simple Usage Example\n\n```d\nmodule main;\n\nimport orange.serialization._;\nimport orange.serialization.archives._;\n\nclass Foo\n{\n\tint a;\n}\n\nvoid main ()\n{\n\tauto foo = new Foo; // create something to serialize\n\tfoo.a = 3; // change the default value of \"a\"\n\n\tauto archive = new XmlArchive!(char); // create an XML archive\n\tauto serializer = new Serializer(archive); // create the serializer\n\n\tserializer.serialize(foo); // serialize \"foo\"\n\n\t// deserialize the serialized data as an instance of \"Foo\"\n\tauto f = serializer.deserialize!(Foo)(archive.untypedData);\n\n\t// verify that the deserialized value is equal to the original value\n\tassert(f.a == foo.a);\n}\n```\n\n### More Examples\n\nSee the [test](https://github.com/jacob-carlborg/orange/tree/master/tests)\ndirectory for some examples.\n\n## D Versions\n\n* D2/Phobos - master branch\n* D2/Tango - See the [mambo repository](https://github.com/jacob-carlborg/mambo).\nThe API is the same, just replace \"orange\" with \"mambo\" for the imports\n* D1/Tango - d1 branch\n* D1/Tango and D2/Phobos in the same branch - mix branch\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacob-carlborg%2Forange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacob-carlborg%2Forange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacob-carlborg%2Forange/lists"}