protobuf/python/google/protobuf/internal
Jie Luo 6c91de9de9 Nextgen Proto Pythonic API: “Add-on” proto for JSON serialize/parse
- add google.protobuf.proto_json module
- wrap json_format's MessageToDict/ParseDict to the new module:

def serialize(
    message: Message,
    always_print_fields_with_no_presence: bool=False,
    preserving_proto_field_name: bool=False,
    use_integers_for_enums: bool=False,
    descriptor_pool: Optional[DescriptorPool]=None,
    float_precision: int=None,
) -> dict

def parse(
    message_class: Type[Message],
    js_dict: dict,
    ignore_unknown_fields: bool=False,
    descriptor_pool: Optional[DescriptorPool]=None,
    max_recursion_depth: int=100
) -> Message

PiperOrigin-RevId: 634490919
2024-05-16 12:25:01 -07:00
..
import_test_package Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 17:49:49 -07:00
numpy Reorganize upb file structure 2023-09-26 14:38:35 -07:00
__init__.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
_parameterized.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
any_test.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
api_implementation.cc Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
api_implementation.py internal chnge 2024-03-26 13:17:46 -07:00
builder.py Internal change 2023-09-18 15:17:56 -07:00
containers.py BREAKING CHANGE in v26: Reject extend repeated field with none iterable (Raise TypeError) 2024-01-04 17:14:41 -08:00
decoder.py internal change 2024-03-08 10:55:53 -08:00
descriptor_database_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
descriptor_pool_test.py Use newly split feature defaults in plugins and runtimes. 2024-04-16 19:18:40 -07:00
descriptor_pool_test1.proto Fixed a bug where FileDescriptor maps like `message_types_by_name` could return descriptors from other files. 2023-12-01 15:12:41 -08:00
descriptor_pool_test2.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
descriptor_test.py Add unit test enum showing allocation in repeated enum lists 2024-04-28 17:27:02 -07:00
encoder.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
enum_type_wrapper.py Automated rollback of commit f799af8bf5. 2024-05-01 10:25:29 -07:00
extension_dict.py Internal change 2023-09-18 15:17:56 -07:00
factory_test1.proto On demand create message meta class for upb python 2023-09-15 11:34:38 -07:00
factory_test2.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
field_mask.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
field_mask_test.py Add `ABSL_ATTRIBUTE_LIFETIME_BOUND` attribute on generated oneof accessors. 2023-09-29 09:01:46 -07:00
file_options_test.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
generator_test.py Add `ABSL_ATTRIBUTE_LIFETIME_BOUND` attribute on generated oneof accessors. 2023-09-29 09:01:46 -07:00
import_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
json_format_test.py Catch all the exceptions in python JSON ParseDict and raise 2024-04-24 11:34:41 -07:00
keywords_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
message_factory_test.py On demand create message meta class for upb python 2023-09-15 11:34:38 -07:00
message_listener.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
message_set_extensions.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
message_test.py Nextgen Proto Pythonic API: Add 'in' operator 2024-05-06 12:13:09 -07:00
missing_enum_values.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
more_extensions.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
more_extensions_dynamic.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
more_messages.proto loosen upb for json name conflict check in proto2 between json name and field 2023-10-09 14:31:17 -07:00
no_package.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
packed_field_test.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
proto_builder_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
proto_json_test.py Nextgen Proto Pythonic API: “Add-on” proto for JSON serialize/parse 2024-05-16 12:25:01 -07:00
proto_test.py Nextgen Proto Pythonic API: “Add-on” proto for serialize/parse 2024-05-09 11:53:56 -07:00
python_edition_defaults.py.template Implement Editions in Pure Python. 2023-11-07 14:40:26 -08:00
python_message.py Nextgen Proto Pythonic API: Add 'in' operator 2024-05-06 12:13:09 -07:00
python_protobuf.cc Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
reflection_test.py Add unit test enum showing allocation in repeated enum lists 2024-04-28 17:27:02 -07:00
runtime_version_test.py Introduce Python Protobuf runtime version. 2024-03-06 08:26:18 -08:00
service_reflection_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
symbol_database_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
test_bad_identifiers.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
test_proto2.proto Add new including_default_value_without_presence_fields to Python JSON serializer. 2024-01-31 14:16:54 -08:00
test_proto3_optional.proto Add new including_default_value_without_presence_fields to Python JSON serializer. 2024-01-31 14:16:54 -08:00
test_util.py Add CI runs for testing upb Python wheels 2023-09-21 11:33:23 -07:00
testing_refleaks.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
text_encoding_test.py Breaking Change: Made text_format output default to UTF-8. 2024-01-23 20:34:54 -08:00
text_format_test.py Fix text-format delimited field handling 2024-04-05 13:08:43 -07:00
thread_safe_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
type_checkers.py use struct instead of ctype. allows the protobuf python library to work on cpython 3.11's new wasm target [1] 2024-05-06 17:35:32 -07:00
unknown_fields_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
well_known_types.py Nextgen Proto Pythonic API: Add 'in' operator 2024-05-06 12:13:09 -07:00
well_known_types_test.py Nextgen Proto Pythonic API: Add 'in' operator 2024-05-06 12:13:09 -07:00
wire_format.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
wire_format_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00