FieldInfo describes a field of a protobuf message for runtime reflection. We distinguish between the following kinds of fields:

  • "scalar": string, bool, float, int32, etc. The scalar type is "T".
  • "enum": The field was declared with an enum type. The enum type is "T".
  • "message": The field was declared with a message type. The message type is "T".
  • "map": The field was declared with map<K,V>. The key type is "K", the value type is "V".

Every field always has the following properties:

  • "no": The field number of the protobuf field.
  • "name": The original name of the protobuf field.
  • "localName": The name of the field as used in generated code.
  • "jsonName": The name for JSON serialization / deserialization.
  • "opt": Whether the field is optional.
  • "repeated": Whether the field is repeated.
  • "packed": Whether the repeated field is packed.

Additionally, fields may have the following properties:

  • "oneof": If the field is member of a oneof group.
  • "default": Only proto2: An explicit default value.
  • "delimited": Only proto2: Use the tag-delimited group encoding.

Generated using TypeDoc