{"id":26873684,"url":"https://github.com/joedeveloper55/pon","last_synced_at":"2025-03-31T09:19:51.558Z","repository":{"id":285275267,"uuid":"957543476","full_name":"joedeveloper55/pon","owner":"joedeveloper55","description":"PON is a lightwight text-based data-interchange format by and for Python programmers","archived":false,"fork":false,"pushed_at":"2025-03-30T18:13:14.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T19:24:09.293Z","etag":null,"topics":["data-format","python3","serialization-library"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joedeveloper55.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-30T16:19:14.000Z","updated_at":"2025-03-30T18:25:43.000Z","dependencies_parsed_at":"2025-03-30T19:24:12.797Z","dependency_job_id":"87c9d415-5ecd-479a-8c9f-080902277d20","html_url":"https://github.com/joedeveloper55/pon","commit_stats":null,"previous_names":["joedeveloper55/pon"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joedeveloper55%2Fpon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joedeveloper55%2Fpon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joedeveloper55%2Fpon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joedeveloper55%2Fpon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joedeveloper55","download_url":"https://codeload.github.com/joedeveloper55/pon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246443534,"owners_count":20778252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-format","python3","serialization-library"],"created_at":"2025-03-31T09:19:51.065Z","updated_at":"2025-03-31T09:19:51.537Z","avatar_url":"https://github.com/joedeveloper55.png","language":"Python","readme":"# pon\nPON (**P**ython **O**bject **N**otation) is a lightwight text-based data-interchange format by and for Python programmers. \nIt is:\n  * human friendly (easy for humans to read and write)\n  * machine friendly (easy for machines to parse and generate)\n  * extensible\n  * bateries-inclueded\n  * programming-language-agnostic (but explicitly designed to be friendly to Python programmers)\n  * relatively secure from common deserialization attacks (eval not used, pickle not used, etc)\n\nThe PON data-interchange format is heavily inspired by JSON (**J**ava**S**cript **O**bject **N**otation). We the creator's of PON believe that the broad success of JSON was not a mere accident but can actually be attributed to several of its design properties:\n\n  * lightweight\n  * readable\n  * minimal\n  * flexible (encode type info in the data itself, no explicit schemas required)\n  * familiar and conventint to JavaScript programmers\n  * limited and secure (less vulnerability to arbitrary remote code executions than other formats)\n\nPON is \"Python's answer to JSON\". It aims to replicate the same great ideas of JSON into a purpose \nbuilt data-interchange format for Python programs, while also adding a few ideas of its own to\ncreate a more extensible data-interchange format.\n\nOut of the box PON has the following 'standard types', that any PON compatible serializer \nand deserializer must support:\n\n|PON Type | Description                                       |\n|-------- | -----------                                       |\n| str     | strings                                           |\n| bytes   | bytes                                             |\n| bool    | True or False                                     | \n| int     | integer (size limit deserializer dependent)       |\n| float   | float (bit representation deserializer dependent) |\n| Decimal | decimal                                           |\n| None    | a None/Null value                                 |\n| dict    | an unordered map of keys and values               |\n| list    | an ordered list of values                         |\n| tuple   | animmutable ordered list of values                |\n| set     | an unordered collection of unique values          |\n| Counter | an unordered collection of values                 |\n\nexactly what kinds of data these objects deserialize into is a choice of the PON serailizer \nand deserializer implementor, but see below for the mapping of the refence Python implemention \n(this project):\n\n|PON Type | Python Type         |\n|-------- | -----------         |\n| str     | str                 |\n| bytes   | bytes               |\n| bool    | bool                |\n| int     | int                 |\n| float   | float               |\n| Decimal | decimal.Decimal     |\n| None    | NoneType            |\n| dict    | dict                |\n| list    | list                |\n| tuple   | tuple               |\n| set     | set                 |\n| Counter | collections.Counter |\n\nIn addition to these standard builtin types, PON has a notion of \"extension\" types. \nExtension types allow a PON document to include values with a type not present in \nthe standard types. A serialzer can register a new type along with serialization \nlogic to enable dumping new types in a PON document. A deserializer can register a new type\nalong with deserialization logic to enable parsing out new types in a PON document.\n\nCare must be taken when adding extension types since it could present a possible attack vector. \nUsers should stick to the standard types as much as possible, only introducing an extension type \nwhen it's really needed, and keep extension types simple. The \"batteries included\" philosophy \nshould help here. PON makes adding them easy when you need to though.\n\nBelow is an example PON document describing an \"order\":\n\n```\n{\n   \"order_id\": 1,\n   \"order_time\": datetime(2025,1,1,0,0,tzinfo=None),\n   \"customer_id\": 4 \n   \"items\": [\n      {\n         \"product_id\": 1,\n         \"product_price_at_time_of_order: Decimal(\"9.99\"),\n         \"number_of_items\": 2,\n         \"tags\": set([\n            \"food\"\n         ])\n      }\n   ]\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoedeveloper55%2Fpon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoedeveloper55%2Fpon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoedeveloper55%2Fpon/lists"}