BARE Message Encoding Binary Application Record Encoding

BARE is a simple binary representation for structured application data.

NOTICE: The BARE encoding is not finalized. Feedback is welcome. draft-devault-bare has been filed with the IETF as an Internet-Draft and represents the latest authoritative draft of the specification.

BARE at a glance

Here is a sample schema:

type PublicKey data[128]
type Time str # ISO 8601

type Department enum {
  ACCOUNTING
  ADMINISTRATION
  CUSTOMER_SERVICE
  DEVELOPMENT

  # Reserved for the CEO
  JSMITH = 99
}

type Address list<str>[4] # street, city, state, country

type Customer struct {
  name: str
  email: str
  address: Address
  orders: list<struct {
    orderId: i64
    quantity: i32
  }>
  metadata: map<str><data>
}

type Employee struct {
  name: str
  email: str
  address: Address
  department: Department
  hireDate: Time
  publicKey: optional<PublicKey>
  metadata: map<str><data>
}

type TerminatedEmployee void

type Person union {Customer | Employee | TerminatedEmployee}

Known implementations

C
cbare
Common Lisp
cl-bare
D
bare
Elm
elm-bare
Erlang
bare
Go
go-bare
Java
bare-jvm
JavaScript
bare-js
.NET
BareNET
OCaml
bare-ocaml
PHP
bare-mess-php
Python
bare-py
pybare
Ruby
bare-rb
Rust
serde_bare
Scheme
kahl
TypeScript
bare-ts
Zig
zig-bare