Coder Social home page Coder Social logo

neouniversalbinaryjson's Introduction

NeoUniversalBinaryJSON

An implementation of Universal Binary JSON (UBJSON) for Pharo.

Build Status

Universal Binary JSON (UBJSON) is a computer data interchange format. It is a binary form directly imitating JSON, but requiring fewer bytes of data. It aims to achieve the generality of JSON, combined with being easier and more efficient to process than JSON.

The size/speed/efficiency differences are minor for typical JSON payloads, especially compared with compacted JSON. The implementation is simpler, though, as there is no string escaping and no number parsing.

UBJSON is making a larger difference when dealing with arrays containing numbers. Especially with ByteArrays, BJSON makes a huge difference, since these are essentially stored natively.

See also

Usage

NeoUBJSONReader reads/parses a Universal Binary JSON stream. Use #on: to initialize it on a binary read stream and decode a value using #next. Its class side #fromByteArray: is convenient too.

NeoUBJSONWriter writes/generates a Universal Binary JSON stream. Use #on: to initialize it on a binary write stream and encode a value using #nextPut:. Its class side #toByteArray: is convenient too.

Installation

This is a Pharo Smalltalk project using the Tonel source code format.

In Pharo 8 you can use Iceberg to load this project.

You can also load using the following expression:

Metacello new
  baseline: 'NeoUniversalBinaryJSON';
  repository: 'github://svenvc/NeoUniversalBinaryJSON';
  load.

Note about Pharo 7 Compatibility

For Pharo 7, prior to 7.0.5, you need to change the method NeoUBJSONWriter>>#writeInteger:ofSize:signed:bigEndian: so that it sends #digitAt: instead of #byteAt:

Written and supported by Sven Van Caekenberghe. MIT Licensed.

neouniversalbinaryjson's People

Contributors

svenvc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.