Giter VIP home page Giter VIP logo

orange's Introduction

Introduction

Orange is a serialization library for the D programming language. It supports D1/Tango and D2/Phobos. It can serialize most of the available types in D, including third party types and can serialize through base class references. It supports fully automatic serialization of all supported types and also supports several ways to customize the serialization process. Orange has a separate front end (the serializer) and back end (the archive) making it possible for the user to create new archive types that can be used with the existing serializer.

Github is only used for the code repository, for more information and issue reporting see the project page: http://dsource.org/projects/orange

Deb Package

A deb package is available on:

APT_Repository_for_D

Build Dependencies

Make or DSSS

D Versions

  • D2/Phobos - master branch
  • D2/Tango - See the mambo repository. The API is the same, just replace "orange" with "mambo" for the imports
  • D1/Tango - d1 branch
  • D1/Tango and D2/Phobos in the same branch - mix branch

Building

The master branch is for D2/Phobos.

  1. Clone the repository
  2. Build the library either using make or dsss

Unit Tests

To run the unit test run the shell script "unittest.sh":

$ ./unittest.sh

Simple Usage Example

module main;

import orange.serialization._;
import orange.serialization.archives._;

class Foo
{
	int a;
}

void main ()
{
	auto foo = new Foo; // create something to serialize
	foo.a = 3; // change the default value of "a"

	auto archive = new XmlArchive!(char); // create an XML archive
	auto serializer = new Serializer(archive); // create the serializer

	serializer.serialize(foo); // serialize "foo"

	// deserialize the serialized data as an instance of "Foo"
	auto f = serializer.deserialize!(Foo)(archive.untypedData);

	// verify that the deserialized value is equal to the original value
	assert(f.a == foo.a);
}

Detailed Build Instructions

Clone the repository:

$ git clone git://github.com/jacob-carlborg/orange.git

Change to the new directory "orange"

$ cd orange

Build the library by running one of the following:

$ dsss build

Or

$ make

orange's People

Contributors

jacob-carlborg avatar jmcabo avatar enjoysmath avatar john-colvin avatar greenduck avatar trass3r avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.