Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

丁松杰 / Pole

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • Pole
  • src
  • Pole.Core
  • Serialization
  • ISerializer.cs
Find file
BlameHistoryPermalink
  • 丁松杰's avatar
    修改 内部逻辑 · b2ed39db
    丁松杰 committed 5 years ago
    b2ed39db
ISerializer.cs 626 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
using System;
using System.Collections.Generic;
using System.Text;

namespace Pole.Core.Serialization
{
    public interface ISerializer
    {
        object Deserialize(byte[] bytes, Type type);
        T Deserialize<T>(byte[] bytes) where T : class, new();
        T Deserialize<T>(string json) where T : class, new();
        object Deserialize(string json, Type type);
        string Serialize<T>(T data) where T : class, new();
        string Serialize(object data, Type type);
        byte[] SerializeToUtf8Bytes<T>(T data) where T : class, new();
        byte[] SerializeToUtf8Bytes(object data, Type type);
    }
}