GithubHelp home page GithubHelp logo

alexandredsimoes / sharpserializer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from polenter/sharpserializer

0.0 1.0 0.0 254 KB

SharpSerializer was ported from CodePlex. SharpSerializer v.3 and above is an open source XML and binary serializer for .NET Framework 4.5.2+ and .NET Standard 1.0+

License: Other

C# 74.19% HTML 25.81%

sharpserializer's Introduction

SharpSerializer 3.x

SharpSerializer is an open source XML and binary serializer for .NET. With only one line of code it can serialize types like: multidimensional array, nested array, array-of-arrays, polymorphic object (where value is inherited from the property type), generic type, generic listing (i.e. dictionary, collection) and many more...

SharpSerializer 3.x was ported from CodePlex to GitHub. It works with .NET Standard 1.0, .NET Framework 4.5.2 and above.

Project URL: https://github.com/polenter/SharpSerializer

License URL: https://github.com/polenter/SharpSerializer/blob/master/LICENSE.txt

Prerequisites

Development Due to the new syntax of the csproj file you need Visual Studio 2017 for development of SharpSerializer.

Runtime SharpSerializer requires a .NET platform implementing .NET Standard 1.0 or above.

According to the .NET Standard implementation support https://docs.microsoft.com/en-us/dotnet/standard/net-standard SharpSerializer works with:

  • .NET Core 1.0
  • .NET Framework 4.5 (with .NET Core 1.x or 2.0 SDK)
  • Mono 4.6
  • Xamarin.iOS 10.0
  • Xamarin.Mac 3.0
  • Xamarin.Android 7.0
  • Universal Windows Platform (UVP) 10.0
  • Windows 8.0
  • Windows Phone (WP) 8.1
  • Windows Phone Silverlight 8.0

For .NET Framework 4.5.2 (and above) and all .NET platforms implementing .NET Standard 1.3 there are additional API overloads providing not only serialization to a stream but also directly to a file by its name.

Installing

Using NuGet is recommended.

In Visual Studio open NuGet Package Manager and type-in: Install-Package SharpSerializer

In the Command Line (.NET CLI) use the dotnet command: dotnet add package SharpSerializer

Usage

var obj = CreateMyVerySophisticatedObject(); var serializer = new SharpSerializer(); serializer.Serialize(obj, "test.xml"); var obj2 = serializer.Deserialize("test.xml");

There are more usage examples on the tutorial page: http://sharpserializer.com/en/tutorial/

Usage Limitations

SharpSerializer serializes only public properties. If you like to serialize fields, they have to be wrapped in properties.

SharpSerializer can deserialize only types providing the default constructor.

Please refer to the following article for a workaround: https://www.codeproject.com/Articles/240621/How-to-serialize-data-effectively-Custom-serializa

Breaking Changes

Comparing to SharpSerializer 2.x

All platforms below .NET Framework 4.5 are no more supported.

Support for Portable Class Library (PCL) was depreciated. The following file is no more deployed: Polenter.SharpSerializer.Portable.dll

There are no breaking changes in the API in .NET Framework 4.5.2 and above.

There are no breaking changes in the API expected, if using PCL, however it's not thoroughly tested yet.

The BSD License (BSD) was changed to MIT License

Deployment

The following libraries should be attached to your deployment package:

  • Polenter.SharpSerializer.dll

The following copyright notice should be attached to your software (e.g. about box): This software includes SharpSerializer - Copyright (c) 2010-2017 Pawel Idzikowski

The content of the LICENSE.txt (MIT License) should be also attached to your software, e.g. as a link, informing people under what conditions SharpSerializer is licensed, even if your software uses other license model.

Contributing

There are some tests concerning deploying and using SharpSerializer 3.x on different platforms, e.g. .NET Framework 4.5.2, .NET Core 1.0, 2.0 and Xamarin. More tests on different platforms are however appreciated.

Additional contributors are welcome.

Authors

Pawel Idzikowski, polenter (owner)

License

This project is licensed under the MIT License - see LICENSE.txt file for details.

sharpserializer's People

Contributors

polenter avatar rmay-tws avatar

Watchers

 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.