All Projects → Flight-School → Messagepack

Flight-School / Messagepack

Licence: mit
A MessagePack encoder and decoder for Codable types

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Messagepack

Guide To Swift Codable Sample Code
Xcode Playground Sample Code for the Flight School Guide to Swift Codable
Stars: ✭ 218 (+30.54%)
Mutual labels:  messagepack, codable
Codability
Useful helpers for working with Codable types in Swift
Stars: ✭ 125 (-25.15%)
Mutual labels:  codable
Jsontocodable
A generating tool from Raw JSON to Codable (Swift4) text written in Swift4.
Stars: ✭ 33 (-80.24%)
Mutual labels:  codable
Msgpack11
A tiny MessagePack library for C++11 (msgpack.org[C++11])
Stars: ✭ 78 (-53.29%)
Mutual labels:  messagepack
Multipart Kit
🏞 Parses and serializes multipart-encoded data with Codable support.
Stars: ✭ 52 (-68.86%)
Mutual labels:  codable
Codextended
Extensions giving Swift's Codable API type inference super powers 🦸‍♂️🦹‍♀️
Stars: ✭ 1,281 (+667.07%)
Mutual labels:  codable
Bettercodable
Better Codable through Property Wrappers
Stars: ✭ 953 (+470.66%)
Mutual labels:  codable
Noproto
Flexible, Fast & Compact Serialization with RPC
Stars: ✭ 138 (-17.37%)
Mutual labels:  messagepack
Prefsmate
🐣 Elegant UITableView generator for Swift.
Stars: ✭ 120 (-28.14%)
Mutual labels:  codable
Adaptivecardui
Snippets of UI, authored in JSON and rendered with SwiftUI
Stars: ✭ 73 (-56.29%)
Mutual labels:  codable
Msgpack Unity3d
MessagePack and JSON serializer for Unity3D
Stars: ✭ 74 (-55.69%)
Mutual labels:  messagepack
Swiftprovisioningprofile
Parse iOS mobile provisioning files into Swift models
Stars: ✭ 55 (-67.07%)
Mutual labels:  codable
Generic Json Swift
A simple Swift library for working with generic JSON structures
Stars: ✭ 95 (-43.11%)
Mutual labels:  codable
Thsidebar
NSOutlineView and badge
Stars: ✭ 38 (-77.25%)
Mutual labels:  codable
Oldpodcasts
A clone of Apple's Podcasts. UIKit version.
Stars: ✭ 128 (-23.35%)
Mutual labels:  codable
Url Encoded Form
📝 Parse and serialize url-encoded form data with Codable support.
Stars: ✭ 32 (-80.84%)
Mutual labels:  codable
Luajit Msgpack Pure
MessagePack for LuaJIT (using FFI, no bindings, V4 API)
Stars: ✭ 71 (-57.49%)
Mutual labels:  messagepack
Django Rest Framework Msgpack
MessagePack support for Django REST framework
Stars: ✭ 78 (-53.29%)
Mutual labels:  messagepack
Ladybug
A powerful model framework for Swift 4
Stars: ✭ 147 (-11.98%)
Mutual labels:  codable
Rq
Record Query - A tool for doing record analysis and transformation
Stars: ✭ 1,808 (+982.63%)
Mutual labels:  messagepack

MessagePack

Build Status

A MessagePack encoder and decoder for Codable types.

This functionality is discussed in Chapter 7 of Flight School Guide to Swift Codable.

Requirements

  • Swift 4.2+

Usage

Encoding Messages

import MessagePack

let encoder = MessagePackEncoder()
let value = try! encoder.encode(["a": 1, "b": 2, "c": 3])
// [0x83, 0xA1, 0x62, 0x02, 0xA1, 0x61, 0x01, 0xA1, 0x63, 0x03]

Decoding Messages

import MessagePack

let decoder = MessagePackDecoder()
let data = Data(bytes: [0xCB, 0x40, 0x09, 0x21, 0xF9, 0xF0, 0x1B, 0x86, 0x6E])
let value = try! decoder.decode(Double.self, from: data)
// 3.14159

Installation

Swift Package Manager

Add the MessagePack package to your target dependencies in Package.swift:

import PackageDescription

let package = Package(
  name: "YourProject",
  dependencies: [
    .package(
        url: "https://github.com/Flight-School/MessagePack",
        from: "1.2.3"
    ),
  ]
)

Then run the swift build command to build your project.

CocoaPods

You can install MessagePack via CocoaPods, by adding the following line to your Podfile:

pod 'MessagePack-FlightSchool', '~> 1.2.3'

Run the pod install command to download the library and integrate it into your Xcode project.

Note The module name for this library is "MessagePack" --- that is, to use it, you add import MessagePack to the top of your Swift code just as you would by any other installation method. The pod is called "MessagePack-FlightSchool" because there's an existing pod with the name "MessagePack".

License

MIT

Contact

Mattt (@mattt)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].