JSONFieldNames supports accessing protocol buffer fields by json-name. Enabling JSON field name support will create a copy of the types.Registry with fields indexed by JSON name, and whether JSON name or Proto-style names are supported will be inferred from the AST extensions metadata.
(enabled bool)
| 506 | // by JSON name, and whether JSON name or Proto-style names are supported will be inferred from |
| 507 | // the AST extensions metadata. |
| 508 | func JSONFieldNames(enabled bool) EnvOption { |
| 509 | return features(featureJSONFieldNames, enabled) |
| 510 | } |
| 511 | |
| 512 | // ProgramOption is a functional interface for configuring evaluation bindings and behaviors. |
| 513 | type ProgramOption func(p *prog) (*prog, error) |