Click here to Skip to main content
Click here to Skip to main content

APJSON

By , 17 Apr 2013
 
Apolyton_FastJson_Binaries__v0.92_.zip
Output
Debug
Apolyton.FastJson.dll
Release x64
Apolyton.FastJson.dll
Release x86
Apolyton.FastJson.dll
consoletest.exe
consoletest.vshost.exe
consoletest.vshost.exe.manifest
fastJSON.dll
Release
Apolyton.FastJson.dll
Silverlight
Apolyton.Json.Silverlight.dll
Apolyton_FastJson_Binaries__v0.93_.zip
Apolyton.FastJson.dll
consoletest.exe
fastJSON.dll
Apolyton.FastJson.dll
consoletest.exe
consoletest.vshost.exe
fastJSON.dll
Apolyton.FastJson.dll
consoletest.exe
consoletest.vshost.exe
fastJSON.dll
Apolyton.FastJson.dll
consoletest.exe
fastJSON.dll
Apolyton.Json.Silverlight.dll
Apolyton_FastJson_Binaries__v0.9_.zip
Apolyton.FastJson.dll
Apolyton.FastJson.dll
consoletest.exe
consoletest.vshost.exe
consoletest.vshost.exe.manifest
fastJSON.dll
Apolyton.FastJson.dll
consoletest.exe
consoletest.vshost.exe
fastJSON.dll
Apolyton.FastJson.dll
consoletest.exe
consoletest.vshost.exe
consoletest.vshost.exe.manifest
fastJSON.dll
apolyton_fastjson_sources__v0.92_.zip
Apolyton.FastJson.Tests
bin
Release
Apolyton.FastJson.dll
Apolyton.FastJSON.Tests.dll
Data
Helpers
ComplexTypes
ParameterRelated
Polymorphism
RegistryHelpers
StandardTypes
obj
Debug
Apolyton.FastJSON.Tests.dll
build.force
Release (x86, CUSTOM TYPES)
build.force
Release
Apolyton.FastJSON.Tests.dll
Properties
Registry
Serialization
Apolyton.FastJson
Apolyton.FastJson.csproj.user
Apolyton.FastJson.Silverlight.csproj.user
Apolyton.FastJson.v11.suo
Bin
Debug
Apolyton.Json.Silverlight.dll
Common
Data
Diagram.cd
obj
Debug
Apolyton.FastJson.dll
Apolyton.Json.Silverlight.dll
Release x64
Apolyton.FastJson.dll
Release x86
Apolyton.FastJson.dll
Release
Apolyton.FastJson.dll
Properties
Registry
Serialization
Console Test
bin
Debug
Apolyton.FastJson.dll
consoletest.exe
consoletest.vshost.exe
fastJSON.dll
DataObjects
obj
Debug
build.force
consoletest.exe
Release x64
consoletest.exe
Release x86
consoletest.exe
Release
build.force
consoletest.exe
Apolyton_FastJson_Sources__v0.93_.zip
Debug
Apolyton.FastJson.dll
Apolyton.FastJSON.Tests.dll
Apolyton.FastJson.dll
Apolyton.FastJSON.Tests.dll
Apolyton.FastJSON.Tests.dll
build.force
Apolyton.FastJSON.Tests.dll
Apolyton.FastJson.csproj.user
Apolyton.FastJson.Silverlight.csproj.user
Apolyton.FastJson.v11.suo
Apolyton.Json.Silverlight.dll
Release
Apolyton.Json.Silverlight.dll
Diagrams
Json.cd
JsonParameters.cd
TypeDescriptors.cd
Apolyton.FastJson.dll
Apolyton.Json.Silverlight.dll
Apolyton.FastJson.dll
Apolyton.FastJson.dll
Apolyton.FastJson.dll
Apolyton.Json.Silverlight.dll
Apolyton.FastJson.dll
consoletest.exe
consoletest.vshost.exe
fastJSON.dll
Release
Apolyton.FastJson.dll
consoletest.exe
fastJSON.dll
x86
Release (x86, CUSTOM TYPES)
Apolyton.FastJson.dll
consoletest.exe
fastJSON.dll
Release x64
Apolyton.FastJson.dll
consoletest.exe
fastJSON.dll
consoletest.exe
consoletest.exe
consoletest.exe
consoletest.exe
x86
Debug
consoletest.exe
Release x64
consoletest.exe
Release x86
consoletest.exe
Release
consoletest.exe
Apolyton_FastJson_Sources__v0.9_.zip
Apolyton.FastJSON.Tests.dll
build.force
Apolyton.FastJSON.Tests.dll
Apolyton.FastJson.csproj.user
Diagram.cd
consoletest.vshost.exe
consoletest.exe
consoletest.exe
consoletest.exe
consoletest.exe
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Apolyton.FastJson.Serialization
{
    /// <summary>
    /// Represents a base class for a custom type serializer
    /// </summary>
    public abstract class CustomTypeSerializer : ICustomTypeSerializer
    {
        /// <summary>
        /// Gets the type for which serializer is responsible for.
        /// </summary>
        public abstract Type Type 
        {
            get; 
        }

        /// <summary>
        /// Gets the name of the type.
        /// </summary>
        public virtual string TypeName
        {
            get { return null; }
        }

        /// <summary>
        /// Gets the bool which indicates whether the custom type serializer implements a serialization method.
        /// </summary>
        public virtual bool CanSerialize
        {
            get { return false; }
        }

        /// <summary>
        /// Gets the bool which indicates whether the custom type serializer implements a deserialization method.
        /// </summary>
        public virtual bool CanDeserialize
        {
            get { return false; }
        }

        /// <summary>
        /// Returns the custom serialized string value.
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public abstract String Serialize(object data);

        /// <summary>
        /// Returns the custom object instance which represents the given string.
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public abstract Object Deserialize(String jsonString);
    }
}

By viewing downloads associated with this article you agree to the Terms of use and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Aron Kovacs
Germany Germany
Member
No Biography provided

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 17 Apr 2013
Article Copyright 2012 by Aron Kovacs
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid