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)
| 455 | // by JSON name, and whether JSON name or Proto-style names are supported will be inferred from |
| 456 | // the AST extensions metadata. |
| 457 | func JSONFieldNames(enabled bool) EnvOption { |
| 458 | return features(featureJSONFieldNames, enabled) |
| 459 | } |
| 460 | |
| 461 | // ProgramOption is a functional interface for configuring evaluation bindings and behaviors. |
| 462 | type ProgramOption func(p *prog) (*prog, error) |