mirror of
https://github.com/luxfi/safe-ios.git
synced 2026-10-30 15:19:20 +00:00
15 lines
347 B
Swift
15 lines
347 B
Swift
//
|
|
// JsonRpc2ClientSerializer.swift
|
|
// JsonRpc2
|
|
//
|
|
// Created by Dmitry Bespalov on 17.12.21.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
// Responsible for converting something Codable to and from json data
|
|
public protocol JsonRpc2ClientSerializer {
|
|
func toJson<T: Encodable>(value: T) throws -> Data
|
|
func fromJson<T: Decodable>(data: Data) throws -> T
|
|
}
|