Registry / serialization / protostuff-core

protostuff-core

JSON →
library1.8.0javamavenunverified

Protobuf serialization library for mutable messages.

<dependency> <groupId>io.protostuff</groupId> <artifactId>protostuff-core</artifactId> <version>1.8.0</version> </dependency>
INSTALL
IMPORT
SIG · PROTOSTUFF-CORE
P
protostuff-core
serializationjavav1.8.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ProtobufIOUtil
io.protostuff.ProtobufIOUtil

Serializes a message to protobuf bytes.

import io.protostuff.ProtobufIOUtil; import io.protostuff.Schema; import io.protostuff.runtime.RuntimeSchema; public class Example { public static void main(String[] args) { Schema<MyMessage> schema = RuntimeSchema.getSchema(MyMessage.class); MyMessage msg = new MyMessage(); byte[] bytes = ProtobufIOUtil.toByteArray(msg, schema, schema.newBuffer()); System.out.println(bytes.length); } }
Debug
Known issues
gotchaProtostuff uses mutable messages; ensure thread safety.
fix
Use separate instances per thread or synchronize access.
affects: all
Upgrade
Version history
1.8.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
protostuff-core — mvn dependency:get protostuff-core · libregistry