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 string # ISO 8601

enum Department {
  ACCOUNTING
  ADMINISTRATION
  CUSTOMER_SERVICE
  DEVELOPMENT

  # Reserved for the CEO
  JSMITH = 99
}

type Customer {
  name: string
  email: string
  address: Address
  orders: []{
    orderId: i64
    quantity: i32
  }
  metadata: map[string]data
}

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

type Person (Customer | Employee)

type Address {
  address: [4]string
  city: string
  state: string
  country: string
}

Known implementations

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
Zig
zig-bare