Title: Use `google.protobuf.json_format` for `resource.dict_to_struct` and `resource.struct_to_dict` · Issue #108 · crossplane/function-sdk-python · GitHub
Open Graph Title: Use `google.protobuf.json_format` for `resource.dict_to_struct` and `resource.struct_to_dict` · Issue #108 · crossplane/function-sdk-python
X Title: Use `google.protobuf.json_format` for `resource.dict_to_struct` and `resource.struct_to_dict` · Issue #108 · crossplane/function-sdk-python
Description: What problem are you facing? We have two helpers to convert between Python dictionaries and protobuf structs: resource.struct_to_dict(some_struct) resource.dict_to_struct(some_dict) I believe these are equivalent to: google.protobuf.json...
Open Graph Description: What problem are you facing? We have two helpers to convert between Python dictionaries and protobuf structs: resource.struct_to_dict(some_struct) resource.dict_to_struct(some_dict) I believe these...
X Description: What problem are you facing? We have two helpers to convert between Python dictionaries and protobuf structs: resource.struct_to_dict(some_struct) resource.dict_to_struct(some_dict) I believe these...
Opengraph URL: https://github.com/crossplane/function-sdk-python/issues/108
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Use `google.protobuf.json_format` for `resource.dict_to_struct` and `resource.struct_to_dict`","articleBody":"\u003c!--\r\nThank you for helping to improve Crossplane!\r\n\r\nPlease be sure to search for open issues before raising a new one. We use issues\r\nfor bug reports and feature requests. Please find us at https://slack.crossplane.io\r\nfor questions, support, and discussion.\r\n--\u003e\r\n\r\n### What problem are you facing?\r\n\u003c!--\r\nPlease tell us a little about your use case - it's okay if it's hypothetical!\r\nLeading with this context helps frame the feature request so we can ensure we\r\nimplement it sensibly.\r\n---\u003e\r\n\r\nWe have two helpers to convert between Python dictionaries and protobuf structs:\r\n\r\n* `resource.struct_to_dict(some_struct)`\r\n* `resource.dict_to_struct(some_dict)`\r\n\r\nI believe these are equivalent to:\r\n\r\n* `google.protobuf.json_format.MessageToDict(some_struct)`\r\n* `google.protobuf.json_format.ParseDict(some_dict, empty_struct)`\r\n\r\n\r\n### How could this Function help solve your problem?\r\n\u003c!--\r\nLet us know how you think this Function could help with your use case. \r\n--\u003e\r\n\r\nI think we should keep our helpers for discoverability/backward compatibility, but have them just use the `json_format` equivalents under the hood.","author":{"url":"https://github.com/negz","@type":"Person","name":"negz"},"datePublished":"2024-11-05T01:14:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/108/function-sdk-python/issues/108"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:00a08281-39bd-e6af-b204-71e2c6c49342 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB40:1A8805:114956:194C38:6A61DD21 |
| html-safe-nonce | 7621ad2737c3e392aaaea18f4a9a01efb1c394c322bb4f9a10114d61af1c8129 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjQwOjFBODgwNToxMTQ5NTY6MTk0QzM4OjZBNjFERDIxIiwidmlzaXRvcl9pZCI6IjYxNzI3MjgyMzIyNTE2MTI0NDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | bc9670c658ee61f7884c7a2309690ef636a14048e7ed40abbcfd6142fa24cafe |
| hovercard-subject-tag | issue:2634193131 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/crossplane/function-sdk-python/108/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8101d342314d90b9e74aaac5930d79e00b1b66fdb1c919e3ccc9966ad6373fc5/crossplane/function-sdk-python/issues/108 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8101d342314d90b9e74aaac5930d79e00b1b66fdb1c919e3ccc9966ad6373fc5/crossplane/function-sdk-python/issues/108 |
| og:image:alt | What problem are you facing? We have two helpers to convert between Python dictionaries and protobuf structs: resource.struct_to_dict(some_struct) resource.dict_to_struct(some_dict) I believe these... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | negz |
| hostname | github.com |
| expected-hostname | github.com |
| None | b2de8c74e5e61e893155ba46ee41bc66170c1644cb795adefa8386d490f7781c |
| turbo-cache-control | no-preview |
| go-import | github.com/crossplane/function-sdk-python git https://github.com/crossplane/function-sdk-python.git |
| octolytics-dimension-user_id | 45158470 |
| octolytics-dimension-user_login | crossplane |
| octolytics-dimension-repository_id | 721365259 |
| octolytics-dimension-repository_nwo | crossplane/function-sdk-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 721365259 |
| octolytics-dimension-repository_network_root_nwo | crossplane/function-sdk-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d1866027ded575df8a15c731dd8b9986c9483ceb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width