Skip to content

Many features, improvements and fixes

Compare
Choose a tag to compare
@davidmorgan davidmorgan released this 20 Dec 10:36
· 703 commits to master since this release
584a775

New features:

  • Add serialize field to @BuiltValueField. Use this to tag fields to skip
    when serializing.
  • Add wireName field to @BuiltValue and @BuiltValueField. Use this to
    override the wire name for classes and fields when serializing.
  • Add @BuiltValueEnum and @BuiltValueEnumConst annotations for specifying
    settings for enums. Add wireName field to these to override the wire names
    in enums when serializing.
  • Add support for polymorphism to StandardJsonPlugin. It will now specify
    type names as needed via a discriminator field, which by defualt is
    called $. This can be changed in the StandardJsonPlugin constructor.
  • Add BuiltListAsyncDeserializer. It provides a way to deserialize large
    responses without blocking, provided the top level serialized type is
    BuiltList.
  • Add built in serializer for Uri.

Improvements:

  • Allow declaration of multiple Serializers in the same file.
  • Explicitly disallow private fields; fail with an error during generation if
    one is found.
  • Improve error message for field without type.

Fixes:

  • Fix generated builder when fields hold function types.
  • Fix checks and generated builder when manually maintained builder has
    generics.
  • Fix name of classes generated from a private class.
  • Fix builder and serializer generation when importing with a prefix.