protobuf.core

This is the public API for working with protocol buffers.

create

(create protobuf-class)(create protobuf-class data)(create impl-key protobuf-class data)

Documentation forthcoming

default-impl-name

Documentation forthcoming

get-impl

(get-impl)

Get the currently configured protobuf implementation. If not defined, used the hard-coded default value (see default-impl-name).

Note that the protobuf backend implementation is configured using JVM system properties (i.e., the -D option). Projects that use lein may set this with :jvm-opts (e.g, :jvm-opts ["-Dprotobuf.impl=flatland"]).

ProtoBufAPI

protocol

members

->bytes

(->bytes this)

->schema

(->schema this)

bytes->

(bytes-> this bytes)

read

(read this in)

write

(write this out)

schema

(schema protobuf-class)

This function is designed to be called against compiled Java protocol buffer classes. To get the schema of a Clojure protobuf instance, you’ll want to use the ->schema method.