Skip to content

v0.7.0

Choose a tag to compare

@merlimat merlimat released this 07 May 19:36
· 21 commits to master since this release

What's New

Protobuf TextFormat (de)serialization (opt-in)

  • New generateTextFormat plugin option (Maven <generateTextFormat>true</generateTextFormat>, Gradle generateTextFormat = true). When enabled, every generated message gets toTextFormat(), writeTextFormatTo(StringBuilder), and parseFromTextFormat(String|byte[]|ByteBuf).
  • Output is canonical multi-line, indented protobuf TextFormat — compatible with com.google.protobuf.TextFormat.printer() for serialization and TextFormat.merge() for parsing, so existing TextFormat data round-trips.
  • Cross-package sub-messages share a ByteBuf cursor, so messages that reference types from a different generated package parse correctly (same handoff used by JSON parsing).

Generated equals() / hashCode()

  • All generated message types now implement equals(Object) and hashCode(), making LightProto messages safe to use directly as keys in HashMap / HashSet and to compare with assertEquals in tests.