msgpack-js

The msgpack protocol implemented in pure javascript.

  • 所有者: creationix/msgpack-js
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

msgpack for JavaScript

node support

browser support

A handwritten msgpack encoder and decoder for Node.JS and modern browsers.

The original format can be found at http://wiki.msgpack.org/display/MSGPACK/Format+specification

Extension

I've extended the format a little to allow for encoding and decoding of undefined and Buffer instances.

This required three new type codes that were previously marked as "reserved".
This change means that using these new types will render your serialized data
incompatible with other messagepack implementations that don't have the same
extension.

There are two new types for storing node Buffer instances. These work just
like "raw 16" and "raw 32" except they are node buffers instead of strings.

buffer 16  11011000  0xd8
buffer 32  11011001  0xd9

Also I've added a type for undefined that works just like the null type.

undefined  11000100  0xc4

Usage

var msgpack = require('msgpack-js');
var assert = require('assert');

var initial = {Hello: "World"};
var encoded = msgpack.encode(initial);
var decoded = msgpack.decode(encoded);

assert.deepEqual(initial, decoded);

主要指標

概覽
名稱與所有者creationix/msgpack-js
主編程語言JavaScript
編程語言JavaScript (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2010-12-11 11:33:46
推送於2018-03-05 16:57:01
最后一次提交2018-03-05 10:57:00
發布數6
最新版本名稱0.3.0 (發布於 )
第一版名稱0.1.0 (發布於 )
用户参与
星數254
關注者數9
派生數44
提交數52
已啟用問題?
問題數17
打開的問題數13
拉請求數6
打開的拉請求數1
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?