cd jsontoproto; go build -o /tmp/jsontoproto; cd ..
. If this fails you may need to run go get
to get missing libraries.jsonnet cr-buildbucket.jsonnet | /tmp/jsontoproto -config_type=buildbucket
buckets: < name: "luci.fuchsia.ci" acls: < role: SCHEDULER identity: "user:luci-scheduler@appspot.gserviceaccount.com" > acl_sets: "default" swarming: < hostname: "chromium-swarm.appspot.com" url_format: "https://luci-milo.appspot.com/swarming/task/{task_id}" builder_defaults: < swarming_tags: "allow_milo:1" swarming_tags: "vpython:native-python-wrapper" dimensions: "pool:luci.fuchsia.ci" recipe: < name: "fuchsia" cipd_package: "fuchsia/infra/recipe_bundles/fuchsia.googlesource.com/infra/recipes" properties: "remote:https://fuchsia.googlesource.com/manifest" properties: "manifest:fuchsia" properties_j: "packages:[\"topaz/packages/buildbot\"]" > execution_timeout_secs: 3600 > builders: < name: "build-roller" dimensions: "os:Linux" recipe: < name: "fuchsia_roller" properties_j: "poll_timeout_secs:5400" properties_j: "$kitchen:{\"git_auth\": true}" properties_j: "project:garnet" properties_j: "remote:https://fuchsia.googlesource.com/garnet" properties_j: "manifest:manifest/minimal" properties_j: "import_in:manifest/garnet" properties_j: "import_from:build" > execution_timeout_secs: 6000 service_account: "third-party-roller@fuchsia-infra.iam.gserviceaccount.com" > > > acl_sets: < name: "default" acls: < group: "all" > >
Note that fields that are set to the default value (as defined in the .proto file) are omited from the output, even if they are explicitly set in the input.
Using Google JavaScript style, where applicable, because it seems to match the jsonnet standard library. Also a nice coincidence that the field names in the LUCI protos generally use snake_case, so there's a visual hint if an identifier refers to a proto field name or not.