Java serialization library, proto compiler, code generator

Overview

Protostuff

A java serialization library with built-in support for forward-backward compatibility (schema evolution) and validation.

  • efficient, both in speed and memory
  • flexible, supporting pluggable formats

Usecase

  • messaging layer in RPC
  • storage format in the datastore or cache

For more information, go to https://protostuff.github.io/docs/

Maven

  1. For the core formats (protostuff, protobuf, graph)
<dependency>
  <groupId>io.protostuffgroupId>
  <artifactId>protostuff-coreartifactId>
  <version>1.7.4version>
dependency>
  1. For schemas generated at runtime
<dependency>
  <groupId>io.protostuffgroupId>
  <artifactId>protostuff-runtimeartifactId>
  <version>1.7.4version>
dependency>

Usage

schema = RuntimeSchema.getSchema(Foo.class); // Re-use (manage) this buffer to avoid allocating on every serialization LinkedBuffer buffer = LinkedBuffer.allocate(512); // ser final byte[] protostuff; try { protostuff = ProtostuffIOUtil.toByteArray(foo, schema, buffer); } finally { buffer.clear(); } // deser Foo fooParsed = schema.newMessage(); ProtostuffIOUtil.mergeFrom(protostuff, fooParsed, schema); }">
public final class Foo
{
    String name;
    int id;
    
    public Foo(String name, int id)
    {
        this.name = name;
        this.id = id;
    }
}

static void roundTrip()
{
    Foo foo = new Foo("foo", 1);

    // this is lazily created and cached by RuntimeSchema
    // so its safe to call RuntimeSchema.getSchema(Foo.class) over and over
    // The getSchema method is also thread-safe
    Schema<Foo> schema = RuntimeSchema.getSchema(Foo.class);

    // Re-use (manage) this buffer to avoid allocating on every serialization
    LinkedBuffer buffer = LinkedBuffer.allocate(512);

    // ser
    final byte[] protostuff;
    try
    {
        protostuff = ProtostuffIOUtil.toByteArray(foo, schema, buffer);
    }
    finally
    {
        buffer.clear();
    }

    // deser
    Foo fooParsed = schema.newMessage();
    ProtostuffIOUtil.mergeFrom(protostuff, fooParsed, schema);
}

Important (for version 1.8.x)

If you are to purely use this to replace java serialization (no compatibility with protobuf), set the following system properties:

-Dprotostuff.runtime.always_use_sun_reflection_factory=true
-Dprotostuff.runtime.preserve_null_elements=true
-Dprotostuff.runtime.morph_collection_interfaces=true
-Dprotostuff.runtime.morph_map_interfaces=true
-Dprotostuff.runtime.morph_non_final_pojos=true

You can also customize it programmatically:

static final DefaultIdStrategy STRATEGY = new DefaultIdStrategy(IdStrategy.DEFAULT_FLAGS 
        | IdStrategy.PRESERVE_NULL_ELEMENTS
        | IdStrategy.MORPH_COLLECTION_INTERFACES
        | IdStrategy.MORPH_MAP_INTERFACES
        | IdStrategy.MORPH_NON_FINAL_POJOS);

Use it:

Schema<Foo> schema = RuntimeSchema.getSchema(Foo.class, STRATEGY);

Questions/Concerns/Suggestions

Requirements

Java 1.6 or higher

Build Requirements

Maven 3.2.3 or higher

Developing with eclipse

mvn install && mvn eclipse:eclipse
# Open eclipse, import existing project, navigate to the protostuff module you're after, then hit 'Finish'.
Comments
  • Parse comments for MessageField & EnumField

    Parse comments for MessageField & EnumField

    Hi David,

    I have a problem right now using your parser. Hope you can help me identify the cause and solve it.

    Problem Background: In my message proto file, there are several fields. Almost all the fields, including primitive type field, message field and enum field, have comments (doc). Since I’m generating the documentation for the proto file, I want all comments of fields to show up.

    Problem: Only comments of primitive type field (int, string, datetime) show up right now, comments of both message field and enum field don’t show up, even though there are comments for the message and enum field in the proto file.

    I'm thinking that maybe all comments of MessageField and EnumField are not parsed through by the parser, and that's the reason it keeps giving me null values.

    Regards, Liang

    feature-request 
    opened by liang216 32
  • Add support for packed fields.

    Add support for packed fields.

    Protobuf allows some fields to be encoded packed:

    https://developers.google.com/protocol-buffers/docs/encoding#optional

    This patch will allow protostuff to read these fields.

    opened by mzeo 30
  • use GraphIOUtil.mergeFrom and GraphIOUtil.writeTo throws IndexOutOfBoundsException

    use GraphIOUtil.mergeFrom and GraphIOUtil.writeTo throws IndexOutOfBoundsException

    here is my test code:

    client code:

    class ClassB
    {
        @Tag(1)
        private String b1;
    
        ClassB()
        {
            this.b1 = "b1";
        }
    }
    
    class SuperClassA
    {
        @Tag(1)
        private String sa1;
    }
    
    class ClassA extends SuperClassA
    {
        @Tag(101)
        private String a1;
    
        @Tag(102)
        private ClassB a2;
    
        public ClassA(ClassB a2)
        {
        }
    }
    

    server code:

    class ClassB
    {
        @Tag(1)
        private String b1;
    
        ClassB()
        {
            this.b1 = "b1";
        }
    }
    class SuperClassA
    {
        @Tag(1)
        private String sa1;
    
        @Tag(2)
        private ClassB sa2;
    
        public SuperClassA(ClassB sa2)
        {
            this.sa1 = "sa1";
            this.sa2 = sa2;
        }
    }
    
    class ClassA extends SuperClassA
    {
        @Tag(101)
        private String a1;
    
        @Tag(102)
        private ClassB a2;
    
        public ClassA(ClassB a2)
        {
            super(a2);
            this.a1 = "a1";
            this.a2 = a2;
        }
    }
    

    Protostuff Version:1.0.7 I use the GraphIOUtil.writeTo on server site to serialize the object, and then on client site use client code to deserialize the object. Then it will throws IndexOutOfBoundsException.

    but if i use ProtostuffUtil to serialize and deserialize the object, it will pass successfully. I want to know whether is this a bug of the GraphUtil, and if this is a bug, which version have been resolved ? here is the exception stack:

    java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at com.dyuproject.protostuff.GraphCodedInput.mergeObject(GraphCodedInput.java:98)
        at com.dyuproject.protostuff.runtime.RuntimeUnsafeFieldFactory$14$1.mergeFrom(RuntimeUnsafeFieldFactory.java:828)
        at com.dyuproject.protostuff.runtime.MappedSchema.mergeFrom(MappedSchema.java:188)
        at com.dyuproject.protostuff.runtime.ObjectSchema.readObjectFrom(ObjectSchema.java:627)
        at com.dyuproject.protostuff.runtime.ObjectSchema.mergeFrom(ObjectSchema.java:312)
        at com.dyuproject.protostuff.GraphCodedInput.mergeFrom(GraphCodedInput.java:153)
        at com.dyuproject.protostuff.CodedInput.mergeObjectEncodedAsGroup(CodedInput.java:271)
        at com.dyuproject.protostuff.CodedInput.mergeObject(CodedInput.java:239)
        at com.dyuproject.protostuff.GraphCodedInput.mergeObject(GraphCodedInput.java:108)
        at com.dyuproject.protostuff.runtime.RuntimeUnsafeFieldFactory$15$1.mergeFrom(RuntimeUnsafeFieldFactory.java:904)
        at com.dyuproject.protostuff.runtime.MappedSchema.mergeFrom(MappedSchema.java:188)
        at com.dyuproject.protostuff.GraphIOUtil.mergeFrom(GraphIOUtil.java:91)
    

    thanks

    opened by muyuqiu001 22
  • Our attempt at reducing the amount of copying in protostuff

    Our attempt at reducing the amount of copying in protostuff

    We really appreciate this project.I wanted to provide a preview of our 0-copy version of protostuff. It obviously needs a lot of work to merge but I wanted to make you aware of it.

    opened by posix4e 17
  • Add support for rpc service code generation using templates

    Add support for rpc service code generation using templates

    Usage: https://github.com/kshchepanovskyi/protostuff-rpc-example

    Fixed issue with multiple module outputs and PluginProtoCompiler Add 'service_block' for service generator templates

    enhancement 
    opened by kshchepanovskyi 14
  • Re-use a ByteBuffer to read bytes from Input

    Re-use a ByteBuffer to read bytes from Input

    Reading objects like Strings in Java causes a lot of garbage that can easily cause large application to suffer from unnecessarily long GCs.

    This patch allows for the usage of an externally maintained ByteBuffer to be filled from the input, so developers can have the freedom to maintain ThreadLocal instances of that ByteBuffer for example and re-use it, avoiding unnecessary allocations.

    opened by tsheasha 12
  • RuntimeEnv#loadClass(String) cannot load class

    RuntimeEnv#loadClass(String) cannot load class

    RuntimeEnv#loadClass(String) explicitly uses current thread's context classloader instead of Class#forName.

    In my use case, where I have a polymorphic field, the class that I want to load is loaded on a separate class loader. As such, I'm unable to deserialize it in this context, because the class is not found on the thread's context class loader.

    I created a hotfix library jar to depend on, and it fixed my issue. Simply returning Class.forName(name) instead of the context class loader call in that method.

    bug 
    opened by Dico200 11
  • Re-use a ByteBuffer to read bytes from Input

    Re-use a ByteBuffer to read bytes from Input

    Reading objects like Strings in Java causes a lot of garbage that can easily cause large application to suffer from unnecessarily long GCs.

    This patch allows for the usage of an externally maintained ByteBuffer to be filled from the input, so developers can have the freedom to maintain ThreadLocal instances of that ByteBuffer for example and re-use it, avoiding unnecessary allocations.

    opened by tsheasha 11
  • Java 8 Encoding/Decoding Fix

    Java 8 Encoding/Decoding Fix

    Motivation

    Java 8's built in String class no longer accepts 3-byte surrogates / 6-byte surrogate pairs. This causes issues when UTF characters, such as emoji's, are present in a string. Since Protostuff encodes using 3-byte surrogates / 6-byte surrogate pairs, deserialization using Java's String class results in a corrupted String.

    The reason why Java 8 no longer supports 3-byte surrogates / 6-byte surrogate pairs is that it has tightened it's implementation to follow the standard more rigorously (see here for details). By following the standards more closely, Protostuff should be compatible with more external sources. For example, Protobuff running on Java 8.

    Changes

    • Support 3-byte surrogates / 6-byte surrogate pairs in Java 8, which allows for communication with older version of protostuff.
    • Encode surrogate pairs using Standard UTF-8, instead of 6-byte surrogate pairs to avoid corruption for decoders without 3-byte surrogate / 6-byte surrogate pair support.

    Effects

    This change should be fully compatible with previous versions of Protostuff, as well as Protobuff's Java implementation (and most likely other language implementations as well). The serialized output should be more in line with what standardized UTF-8 decoders expect.

    DataInputStream, however, will not the ability to reliably decode Strings that contain 4-byte surrogates pairs, as they have no support for 4-byte encoded characters. There are many ways around this, however, so it is not a huge concern.

    opened by mfycheng 11
  • JSON serialization of unsigned numbers (uint32, uint64, fixed32, fixed64)

    JSON serialization of unsigned numbers (uint32, uint64, fixed32, fixed64)

    A message field of type uint32 that actually uses the sign-bit, appears to be serialized to JSON as a negative number.

    For example, if the corresponding java int has this value:

    0xFAE15000
    

    protostuff-json will serialize this to a value -85897216, whereas it really is 4209070080.

    This caught me by surprise, as I was not expecting that behaviour in a non-binary format like JSON. I can work around it for my use case by doing some post-processing, but was wondering whether it's a deliberate choice on your end.

    thanks

    bug 
    opened by fqqb 10
  • IntelliJ IDEA & protostuff-me

    IntelliJ IDEA & protostuff-me

    I can't build project in my favourite IDE. There is an issue with protostuff-me - IntelliJ Idea does not support different language versions for single module - 1.3 for main and 1.7 for tests.

    Are there any solutions for this issue?

    P.S. I understand that this question is only about convenience and I always can run mvn clean install from command prompt.

    opened by kshchepanovskyi 10
  • JsonIOUtil.toByteArray stack overflow when there is reference loop in message

    JsonIOUtil.toByteArray stack overflow when there is reference loop in message

    When there is an reference loop in the object map, the JsonIOUtil.toByteArray method will result in StackOverflowError. Following are the steps to reproduce this phenomenon.

    `public class UserVO {

    public String name;
    
    public UserVO userVO;
    
    public T t;
    

    }

    @Test public void test1() throws IOException { UserVO u1 = new UserVO<>(); u1.name = "u1-name"; u1.t = 43d;

        UserVO u2 = new UserVO();
        u2.name = "u2-name";
        u2.userVO = u1;
    
        u1.userVO = u2;
    
        DefaultIdStrategy STRATEGY = new DefaultIdStrategy(IdStrategy.DEFAULT_FLAGS
                | IdStrategy.PRESERVE_NULL_ELEMENTS
                | IdStrategy.MORPH_COLLECTION_INTERFACES
                | IdStrategy.MORPH_MAP_INTERFACES
                | IdStrategy.MORPH_NON_FINAL_POJOS);
        Schema<UserVO> schema = RuntimeSchema.getSchema(UserVO.class,STRATEGY);
    
        String s = new String(JsonIOUtil.toByteArray(u1, schema, false));
        System.out.println(s);
    
        UserVO fooParsed = schema.newMessage();
        JsonIOUtil.mergeFrom(s.getBytes(), fooParsed, schema, false);
        System.err.println(fooParsed);
    
    }
    

    Following is the top part of the error stack

    java.lang.StackOverflowError at com.fasterxml.jackson.core.json.UTF8JsonGenerator.writeFieldName(UTF8JsonGenerator.java:186) at com.fasterxml.jackson.core.json.JsonGeneratorImpl.writeStringField(JsonGeneratorImpl.java:202) at io.protostuff.JsonOutput.writeString(JsonOutput.java:407) at io.protostuff.runtime.DefaultIdStrategy.writePojoIdTo(DefaultIdStrategy.java:507) at io.protostuff.runtime.DerivativeSchema.writeTo(DerivativeSchema.java:111) at io.protostuff.JsonOutput.writeObject(JsonOutput.java:507) at io.protostuff.runtime.RuntimeUnsafeFieldFactory$14$1.writeTo(RuntimeUnsafeFieldFactory.java:1134) at io.protostuff.runtime.RuntimeSchema.writeTo(RuntimeSchema.java:475) at io.protostuff.runtime.DerivativeSchema.writeTo(DerivativeSchema.java:121) at io.protostuff.JsonOutput.writeObject(JsonOutput.java:507) `

    opened by 601724080 1
  • Protostuff Maven plugin does not support Map in Proto Version 2

    Protostuff Maven plugin does not support Map in Proto Version 2

    I would like to use map defined in .proto v2 file to generate protostuff code. But with no luck. Have someone encounter that before, how are you overcome this?

    opened by CHANist 0
  • how to replace my defined class id(int) to className

    how to replace my defined class id(int) to className

    I opend morph_non_final_pojos option, but it is write className string to the final bytes, It is too large when use the colloctions or maps, so I want to replace my defined class id(int) to className, how to do it?

    opened by huyixin 2
  • NPE from RuntimeEnv.loadClass

    NPE from RuntimeEnv.loadClass

    NPE happens in my app. pls see the code below:

    method : io.protostuff.runtime.RuntimeEnv#loadClass

    @SuppressWarnings("unchecked")
    static <T> Class<T> loadClass(String className)
    {
        try
        {
            return (Class<T>) Thread.currentThread().getContextClassLoader()
                    .loadClass(className);
        }
        catch (ClassNotFoundException e)
        {
            try {
                return (Class<T>) Class.forName(className);
            } catch (ClassNotFoundException e1) {
                throw new RuntimeException(e);
            }
        }
    }
    

    when i use netty GlobalEventExecutor to support thread asynchronization, GlobalEventExecutor would setContextClassLoader((ClassLoader)null),

    so Thread.currentThread().getContextClassLoader() is null ,it will lead to NPE.

    beside ,i have see this issue : https://github.com/protostuff/protostuff/issues/223

    image image

    opened by baobinghai 0
  • How to support protobuf3 wrappers?

    How to support protobuf3 wrappers?

    I serialized a Java object, in which the field of integer type is used, and the int32value is used in proto3. When I tried to deserialize using protobuf, I failed.What did I do wrong?

    Java:

    public class JavaObject {
        private Integer value1;
    }
    

    Protobuf:

    message ProtoMessage {
        google.protobuf.Int32Value value1 = 1;
    }
    
    opened by a11enhuang 1
  • Deserialization throw NPE

    Deserialization throw NPE

    version: 1.8.0 seems same problem as issue#264 at io.protostuff.runtime.HasDelegate, line 39. change parameter handler from null to ArraySchemas.GENERIC_HANDLER

    public class CollectionWithArrayItemThrowNpeTest {
        @Test
        public void test() {
            try {
                DefaultIdStrategy idStrategy = new DefaultIdStrategy(IdStrategy.DEFAULT_FLAGS | IdStrategy.COLLECTION_SCHEMA_ON_REPEATED_FIELDS);
                idStrategy.registerDelegate(new ProtobufCalendar());
    
                ClassThrowNpeWhenDeserialize originMsg = new ClassThrowNpeWhenDeserialize();
                originMsg.value = new ArrayList<Calendar[]>();
                Calendar[] vArray = new Calendar[1];
                vArray[0] = Calendar.getInstance();
                originMsg.value.add(vArray);
                RuntimeSchema<ClassThrowNpeWhenDeserialize> schema = RuntimeSchema.createFrom(ClassThrowNpeWhenDeserialize.class, idStrategy);
    
                byte[] bytes = ProtobufIOUtil.toByteArray(originMsg, schema, LinkedBuffer.allocate(512));
                ClassThrowNpeWhenDeserialize msg = schema.newMessage();
    
                ProtobufIOUtil.mergeFrom(bytes, msg, schema);
            } catch (NullPointerException e) {
                e.printStackTrace();
                Assert.fail();
            }
        }
    
        static class ClassThrowNpeWhenDeserialize{
            List<Calendar[]> value = new ArrayList<Calendar[]>();
        }
    
        public static class ProtobufCalendar implements Delegate<Calendar> {
    
            @Override
            public WireFormat.FieldType getFieldType() {
                return WireFormat.FieldType.FIXED64;
            }
    
            @Override
            public Calendar readFrom(Input input) throws IOException {
                Calendar calendar = Calendar.getInstance();
                calendar.setTimeInMillis(input.readFixed64());
                return calendar;
            }
    
            @Override
            public void writeTo(Output output, int number, Calendar value, boolean repeated) throws IOException {
                output.writeFixed64(number, value.getTimeInMillis(), repeated);
            }
    
            @Override
            public void transfer(Pipe pipe, Input input, Output output, int number, boolean repeated) throws IOException {
                output.writeFixed64(number, input.readSInt64(), repeated);
            }
    
            @Override
            public Class<?> typeClass() {
                return Calendar.class;
            }
    
        }
    }
    
    opened by rxh1999 1
Releases(protostuff-1.5.0)
  • protostuff-1.5.0(Sep 8, 2016)

  • protostuff-1.4.4(Jun 1, 2016)

  • protostuff-1.4.3(Jun 1, 2016)

    Fixes

    #176, #177: Solve problem with serializing custom Collections - allow registering a schema/delegate for collection classes.

    #181, #183: Fix problem with GraphIOUtil and unknown fields.

    #174, #178: Fix serialization of null in Enumeration ArrayList

    Enhancements

    #182: Use flags in IdStrategy for customizing RuntimeSchema behavior in addition to system properties

    Source code(tar.gz)
    Source code(zip)
  • protostuff-1.4.2(Jun 1, 2016)

  • protostuff-1.4.1(Jun 1, 2016)

  • protostuff-1.4.0(Mar 10, 2016)

    Enhancements

    https://github.com/protostuff/protostuff/pull/166: Upgrade Jackson to 2.7.1 https://github.com/protostuff/protostuff/issues/148: JSON serialization of unsigned numbers (uint32, uint64, fixed32, fixed64) https://github.com/protostuff/protostuff/issues/156: Add field name to Exception message if @Tag is missing on a field in a class hierarchy

    Fixes

    https://github.com/protostuff/protostuff/pull/167: Fix ByteSting#toString() implementation https://github.com/protostuff/protostuff/issues/154: XmlIOUtil method fix (args was not used)

    Source code(tar.gz)
    Source code(zip)
  • protostuff-1.3.8(Nov 20, 2015)

  • protostuff-1.3.7(Oct 6, 2015)

  • protostuff-1.3.6(Aug 6, 2015)

    Improvements

    • https://github.com/protostuff/protostuff/pull/133: [protostuff-api] Add service annotations.
    • https://github.com/protostuff/protostuff/pull/126: [code generator] Add two new filters - trim + cut spaces.

    Fixes

    • https://github.com/protostuff/protostuff/issues/127: [code generator] Fix proto_path warning on Windows.
    Source code(tar.gz)
    Source code(zip)
  • protostuff-1.3.5(Apr 20, 2015)

  • protostuff-1.3.4(Apr 19, 2015)

    Improvements

    • https://github.com/protostuff/protostuff/issues/22: Parse comments for MessageField & EnumField [parser]. This feature was introduced in order to allow users generate documentation/javadoc from proto files.
    • https://github.com/protostuff/protostuff/pull/118: Add two new formats for code generator - PLURAL and SINGULAR [code generator]

    Fixes

    • https://github.com/protostuff/protostuff/issues/16: LinkBuffer#getBuffers should include the current buffer [core]
    • https://github.com/protostuff/protostuff/issues/117: [protostuff-maven-plugin]: protoModule without output definition gives NPE
    • https://github.com/protostuff/protostuff/pull/121: [protostuff-maven-plugin] Add output dir to test compile sources if phase=generate-test-sources
    Source code(tar.gz)
    Source code(zip)
  • protostuff-1.3.3(Mar 23, 2015)

    Improvements

    • https://github.com/protostuff/protostuff/pull/105: Add option for generating field maps with original field names [generated code]

    Fixes

    • https://github.com/protostuff/protostuff/issues/98: Fix for messages with sparse/big @Tag values [runtime schemas]
    • https://github.com/protostuff/protostuff/issues/108: Fix for default values in java_bean_model [generated code]
    • https://github.com/protostuff/protostuff/issues/107: Getter of optional enum should return null if not set [generated code]

    Compatibility notes

    • Please check https://github.com/protostuff/protostuff/issues/107 as it changes structure of the schema, generated by java_bean. Now default values are not applied automatically for all field types, unless default value is specified explicitly. If you use protobuf as a serialization format, you should always do check for null and treat null as a default value. For example, you can use Guava's utility method: MoreObjects.firstNonNull(message.getNullableFieldValue(), DEFAULT_FIELD_VALUE).
    Source code(tar.gz)
    Source code(zip)
  • protostuff-1.3.2(Feb 28, 2015)

    Improvements

    • https://github.com/protostuff/protostuff/issues/81: add validation for @Tag annotation value, throw an IllegalArgumentException when value is out of range [protostuff-runtime]
    • https://github.com/protostuff/protostuff/issues/83: add maven "Bill of Materials" module
    • https://github.com/protostuff/protostuff/pull/94: add method getProtoType for Field [code generator]
    • https://github.com/protostuff/protostuff/issues/92: generate equals() and hashCode() for generated messages [code generator]
    Source code(tar.gz)
    Source code(zip)
  • protostuff-1.3.1(Feb 12, 2015)

    Improvements

    https://github.com/protostuff/protostuff/issues/86: Configure system properties for maven plugin in the POM

    Now it is possible to specify proto-compiler options directly in pom.xml

    <plugin>
            <groupId>io.protostuff</groupId>
            <artifactId>protostuff-maven-plugin</artifactId>
            <version>${protostuff.version}</version>
            <configuration>
              <properties>
                <property>
                  <name>ppc.check_filename_placeholder</name>
                  <value>true</value>
                </property>
              </properties>
              <protoModules>
    ...
    

    Fixes

    https://github.com/protostuff/protostuff/issues/84: Value of @Generated annotation is not valid string [code generator] https://github.com/protostuff/protostuff/pull/90:

    • fixed issue with relative template file location (<output> maven plugin option) in multi-module projects
    • fixed PluginProtoCompiler behavior when ppc.check_filename_placeholder is enabled, https://code.google.com/p/protostuff/issues/detail?id=166
    Source code(tar.gz)
    Source code(zip)
  • protostuff-1.3.0(Jan 12, 2015)

    Improvements

    • https://github.com/protostuff/protostuff/pull/74: Switch to com.fasterxml.jackson v2.4.4
    • https://github.com/protostuff/protostuff/issues/79: Add @Generated annotation to generated classes

    Fixes

    • https://github.com/protostuff/protostuff/issues/58: Do not wrap lists into Collections.unmodifiableList(source) (code generated by java_bean template)
    Source code(tar.gz)
    Source code(zip)
  • protostuff-1.2.0(Dec 14, 2014)

    Improvements

    • https://github.com/protostuff/protostuff/issues/25: Added @Tag support for enums in protostuff-runtime
    • https://github.com/protostuff/protostuff/issues/32: Added support for messages without fields (empty messages)
    • https://github.com/protostuff/protostuff/pull/35: Added support for RPC service code generation. Example.
    • https://github.com/protostuff/protostuff/pull/38: Added ability to import proto in multi-module project. Example.

    Fixes

    • https://github.com/protostuff/protostuff/issues/34: Fixed issue with CESU-8 charset and Java 8.

    Compatibility

    • https://github.com/protostuff/protostuff/issues/29: The minimum requirement for Java has now been raised to Java SE 7.
    • https://github.com/protostuff/protostuff/issues/36: Move protostuff-me to separate project.
    Source code(tar.gz)
    Source code(zip)
  • protostuff-1.1.0(Nov 7, 2014)

    Compatibility

    The 1.1.0 release is the last release that supports Java 5.

    The 1.1+ versions will not be wire-compatible with the ff:

    • protostuff-runtime 1.0.x
    • protostuff-xml 1.0.x

    Fixes

    • Issue 161: Optimize ProtobufOutput for small nested messages (max size of 127)
    • Issue 157: ConcurrentLinkedDeque support
    • Issue 156: Support for newing object instances on Android 4.3+ devices
      • thanks to eedzjee
    • Issue 153: YamlOutput bug on repeated message fields
    • Issue 151: optimize xml format
    • Issue 141: protostuff ser/der can not keep order of elements in an array which contain null value
      • thanks to lzh0379
    • Issue 119: Reflection-based array operations are rather expensive
    Source code(tar.gz)
    Source code(zip)
Owner
protostuff
the stuff that leverages google's protobuf
protostuff
Intelligent Semantic Web ALC Generator Testing Reasoner

Intelligent Semantic Web ALC Generator Testing Reasoner

Gianluca De Lucia 2 Jan 13, 2022
Auto Code Audit Framework for Java

前言 笔者最近在研究java自动化代码审计这方面的内容,也看了一些相关的文章,其中主要是跟着4ra1n师傅的文章进行学习的。目前学到的有两种自动化审计思路,一是AST,二是ASM。前者基于java源代码,后者基于字节码。

r2 61 Nov 30, 2022
A harness to build the source code from openjdk.java.net using Free Software tools and dependencies

A harness to build the source code from openjdk.java.net using Free Software tools and dependencies

IcedTea 2 Mar 5, 2022
This repository holds the source code for TML (Tecknix Mod Loader)'s API.

This repository contains the modding API not the MDK (Mod Development Kit). This repository will not give you the ability to mod Tecknix Client but you can contribute to the repository if you have events you would like to add.

Tecknix Client 6 Aug 1, 2022
Compilation of code scripts from the Fall 2021 semester of Intelligent Tunneling subteam.

VIP-Fall-2021 Compilation of code scripts from the Fall 2021 semester of Intelligent Tunneling subteam. Table of Contents Overview Data Normalization

Kruti Gupta 1 Feb 2, 2022
icecream-java is a Java port of the icecream library for Python.

icecream-java is a Java port of the icecream library for Python.

Akshay Thakare 20 Apr 7, 2022
JPassport works like Java Native Access (JNA) but uses the Foreign Linker API instead of JNI. Similar to JNA, you declare a Java interface that is bound to the external C library using method names.

JPassport works like Java Native Access (JNA) but uses the Foreign Linker API instead of JNI. Similar to JNA, you declare a Java interface t

null 28 Dec 30, 2022
Java XML library. A really cool one. Obviously.

XMLBeam This is a Java XML library with an extraordinary expressive API. By using XPath for read and write operations, many operations take only one l

Sven Ewald 70 Aug 25, 2022
Discord IPC - Pure Java 16 library

Pure Java 16 library for interacting with locally running Discord instance without the use of JNI.

Meteor Development 8 Nov 14, 2022
A Local implementation of a java library functions to create a serverside and clientside application which will communicate over TCP using given port and ip address.

A Local implementation of java library functions to create a serverside and clientside application which will communicate over TCP using given port and ip address.

Isaac Barry 1 Feb 12, 2022
null 8 Dec 22, 2022
This library provides facilities to match an input string against a collection of regex patterns.

This library provides facilities to match an input string against a collection of regex patterns. This library acts as a wrapper around the popular Chimera library, which allows it to be used in Java.

Sahab 5 Oct 26, 2022
Apache OpenNLP library is a machine learning based toolkit for the processing of natural language text

Welcome to Apache OpenNLP! The Apache OpenNLP library is a machine learning based toolkit for the processing of natural language text. This toolkit is

The Apache Software Foundation 1.2k Dec 29, 2022
Scaffolding is a library for Minestom that allows you to load and place schematics.

This library is very early in development and has too many bugs to count. For your own safety, you should not use it in a production environment.

Crystal Games 18 Nov 29, 2022
Crackersanimator is a particle system library that works with the standard Android UI

Crackersanimator is a particle system library that works with the standard Android UI. This library build from https://github.com/plattysoft/Leonids library but make some update to support for latest version of android.

null 3 Jun 14, 2022
Modern Java - A Guide to Java 8

Modern Java - A Guide to Java 8 This article was originally posted on my blog. You should also read my Java 11 Tutorial (including new language and AP

Benjamin Winterberg 16.1k Jan 5, 2023
From Java To Kotlin - Your Cheat Sheet For Java To Kotlin

From Java To Kotlin From Java To Kotlin - Your Cheat Sheet For Java To Kotlin 中文支持 Português Español Print to Console Java System.out.print("Amit Shek

MindOrks 5.8k Dec 29, 2022
Ultra-fast SQL-like queries on Java collections

CQEngine - Collection Query Engine CQEngine – Collection Query Engine – is a high-performance Java collection which can be searched with SQL-like quer

Niall Gallagher 1.6k Dec 30, 2022
Design patterns implemented in Java

Design patterns implemented in Java Read in different language : CN, KR, FR, TR, AR Introduction Design patterns are the best formalized practices a p

Ilkka Seppälä 79k Dec 31, 2022