From ce5e6d63b23b01c2a71178ef764384f64a81ad23 Mon Sep 17 00:00:00 2001 From: Charles Mita Date: Tue, 19 Mar 2024 16:16:30 +0100 Subject: [PATCH] Replace instances of to_json() method with json.encode(..) (#474) The to_json and to_proto methods on struct are deprecated and will be removed. The "json" and "proto" builtin modules should be used instead. This replaces instances of `foo.to_json()` with `json.encode(foo)`. --- web/internal/metadata.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/internal/metadata.bzl b/web/internal/metadata.bzl index 96dccb50..92b0a63c 100644 --- a/web/internal/metadata.bzl +++ b/web/internal/metadata.bzl @@ -87,7 +87,7 @@ def _create_file( ctx.actions.write( output = output, - content = struct(**fields).to_json(), + content = json.encode(struct(**fields)), is_executable = False, )