0.0.1 • Published 7 years ago

zser v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

zser.js Latest Version Build Status MIT licensed

JavaScript-compatible TypeScript implementation of zser: a security-oriented serialization format with novel authentication properties based on "Merkleized" data structures.

For more information, see the toplevel README.md.

Help and Discussion

Have questions? Want to suggest a feature or change?

Requirements

zser.js is presently targeting ES2017. This is because we soon plan on making use of the TC39 BigInt type when it becomes available, and want to make sure users of this library can handle modern ECMAScript versions.

Please make sure your JS runtime is ES2017 compliant, or use a transpiler like babel support older versions of ECMAScript.

Installation

Via npm:

npm install zser

Via Yarn:

yarn install zser

Import TJSON into your project with:

import zser from "zser";

API

Zser.parse()

The Zser.parse() method parses a Uint8Array containing a serialized zser message into a corresponding self-describing object representation.

Parameters

  • message: The Uint8Array containing a zser message to parse

Example

let message = new Uint8Array([0x15, 0x07, 0x02, 0x03, 0x55]);
Zser.parse(message);
// Object { 1: Object { 24: 42 } }

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/zcred/zser

Copyright

Copyright (c) 2017 The Zcred Developers. See LICENSE.txt for further details.