Skip to content

Commit cb3c237

Browse files
committed
Re-add comment about json_format.ParseDict
1 parent 6259bea commit cb3c237

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/a2a/utils/proto_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
def dict_to_struct(dictionary: dict[str, Any]) -> struct_pb2.Struct:
2828
"""Converts a Python dict to a Struct proto.
2929
30+
Unfortunately, using `json_format.ParseDict` does not work because this
31+
wants the dictionary to be an exact match of the Struct proto with fields
32+
and keys and values, not the traditional Python dict structure.
33+
3034
Args:
3135
dictionary: The Python dict to convert.
3236

0 commit comments

Comments
 (0)