# Package com.google.protobuf.util (3.19.4)

## Classes

### [Durations](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.util.Durations)

Utilities to help create/manipulate `protobuf/duration.proto`. All operations throw an
IllegalArgumentException if the input(s) are not [valid](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.util.Durations#com_google_protobuf_util_Durations_isValid_com_google_protobuf_Duration_).

### [FieldMaskUtil](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.util.FieldMaskUtil)

Utility helper functions to work with [com.google.protobuf.FieldMask](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask).

### [FieldMaskUtil.MergeOptions](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.util.FieldMaskUtil.MergeOptions)

Options to customize merging behavior.

### [JsonFormat](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.util.JsonFormat)

Utility classes to convert protobuf messages to/from JSON format. The JSON
format follows Proto3 JSON specification and only proto3 features are
supported. Proto2 only features (e.g., extensions and unknown fields) will
be discarded in the conversion. That is, when converting proto2 messages
to JSON format, extensions and unknown fields will be treated as if they
do not exist. This applies to proto2 messages embedded in proto3 messages
as well.

### [JsonFormat.Parser](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.util.JsonFormat.Parser)

A Parser parses JSON to protobuf message.

### [JsonFormat.Printer](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.util.JsonFormat.Printer)

A Printer converts protobuf message to JSON format.

### [JsonFormat.TypeRegistry](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.util.JsonFormat.TypeRegistry)

A TypeRegistry is used to resolve Any messages in the JSON conversion.
You must provide a TypeRegistry containing all message types used in
Any message fields, or the JSON conversion will fail because data
in Any message fields is unrecognizable. You don't need to supply a
TypeRegistry if you don't use Any message fields.

### [JsonFormat.TypeRegistry.Builder](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.util.JsonFormat.TypeRegistry.Builder)

A Builder is used to build [TypeRegistry](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TypeRegistry).

### [Structs](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.util.Structs)

Utilities to help create `google.protobuf.Struct` messages.

### [Timestamps](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.util.Timestamps)

Utilities to help create/manipulate `protobuf/timestamp.proto`. All operations throw an
IllegalArgumentException if the input(s) are not [valid](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.util.Timestamps#com_google_protobuf_util_Timestamps_isValid_com_google_protobuf_Timestamp_).

### [Values](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.util.Values)

Utilities to help create `google.protobuf.Value` messages.