{"id":50583095,"url":"https://github.com/zoreu/toon_plus","last_synced_at":"2026-06-05T04:01:35.431Z","repository":{"id":324815742,"uuid":"1098646638","full_name":"zoreu/toon_plus","owner":"zoreu","description":"Toon Plus format","archived":false,"fork":false,"pushed_at":"2025-11-18T03:17:17.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-18T03:28:21.691Z","etag":null,"topics":["python","toon","toon-format","toon-plus"],"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/zoreu.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-18T00:52:30.000Z","updated_at":"2025-11-18T03:17:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zoreu/toon_plus","commit_stats":null,"previous_names":["zoreu/toon_plus"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zoreu/toon_plus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoreu%2Ftoon_plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoreu%2Ftoon_plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoreu%2Ftoon_plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoreu%2Ftoon_plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoreu","download_url":"https://codeload.github.com/zoreu/toon_plus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoreu%2Ftoon_plus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33928631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["python","toon","toon-format","toon-plus"],"created_at":"2026-06-05T04:01:34.600Z","updated_at":"2026-06-05T04:01:35.420Z","avatar_url":"https://github.com/zoreu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# toon_plus\nToon Plus format implementation based on Toon + CSV format.\n## Token-Oriented Object Notation Plus (TOON PLUS)\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/zoreu/toon_plus/blob/main/toon_test.ipynb)\n\n```python\nfrom toon_plus import toon_plus\ndata = {\n    \"users\": [\n        {\"name\": \"Ana\", \"age\": None, \"active\": False, \"country\": \"Brasil\"},\n        {\"name\": \"Bruno\", \"age\": 34, \"active\": True, \"country\": \"Portugal\"}\n    ],\n    \"products\": [\n        {\"id\": 1, \"name\": \"Caneta\", \"price\": 2.5},\n        {\"id\": 2, \"name\": \"Caderno\", \"price\": 15.0}]\n    }\ndata2 = [\n    {\"name\": \"Ana\", \"age\": None, \"active\": False},{\"name\": \"Bruno\", \"age\": 34, \"active\": True}\n    ]\ndata3 = {'name': 'John', 'age': 30, 'is_student': False}\ndata4 = {\"Users\": {\"name\": \"Alice\", \"age\": 25}}\ndata5 = {\"Users\": {\"name\": \"Alice\", \"age\": 25, \"jobs\": ['Engineer', 'Writer']}}\ndata6 = {\"Users\": {\"name\": \"Alice\", \"age\": 25, \"address\": {\"city\": \"Wonderland\", \"zip\": \"12345\"}}}\ndata7 = [1,2,4,5,6]\ntoon_text = toon_plus.encode(data)\nprint(\"Toon Plus Format:\")\nprint(toon_text)\ndict_data = toon_plus.decode(toon_text)\nprint(\"\\nDecoded Dictionary:\")\nprint(dict_data)\nprint(\"\\nDecoded json:\")\njson_data = toon_plus.decode2json(toon_text)\nprint(json_data)\nprint(\"\\nToon Plus Format (simple array):\")\ntoon_text2 = toon_plus.encode(data2)\nprint(toon_text2)\ndict_data2 = toon_plus.decode(toon_text2)\nprint(\"\\nDecoded Dictionary (simple array):\")\nprint(dict_data2)  \nprint(\"\\nDecoded json (simple array):\")\njson_data2 = toon_plus.decode2json(toon_text2)\nprint(json_data2)  \ntoon_text3 = toon_plus.encode(data3)\nprint(\"\\nToon Plus Format (simple object):\")\nprint(toon_text3) \nprint(\"\\nDecoded Dictionary (simple object):\")\ndict_data3 = toon_plus.decode(toon_text3)\nprint(dict_data3)\nprint(\"\\nDecoded json (simple object):\")\njson_data3 = toon_plus.decode2json(toon_text3)\nprint(json_data3) \nprint(\"\\n=== dict inside dict (named simple object) ===\")\ndict_in_dict = toon_plus.encode(data4)\nprint(dict_in_dict)\nprint(\"\\ndecoded (named simple object):\", toon_plus.decode(dict_in_dict))    \nprint(\"\\n=== list inside dict ===\")\nlist_in_dict = toon_plus.encode(data5)\nprint(list_in_dict)\nprint(\"\\ndecoded (list inside dict):\", toon_plus.decode(list_in_dict))\nprint(\"\\n=== dict inside dict inside dict ===\")\ndict_in_dict_in_dict = toon_plus.encode(data6)\nprint(dict_in_dict_in_dict)        \nprint(\"\\ndecoded (dict inside dict inside dict):\", toon_plus.decode(dict_in_dict_in_dict))\nprint(\"\\n=== simple list of numbers ===\")\nlist_numbers = toon_plus.encode(data7)\nprint(list_numbers)\nprint(\"\\ndecoded (simple list of numbers):\", toon_plus.decode(list_numbers))\n```\n```bash\n# OUTPUT\n\nToon Plus Format:\nusers{name,age,active,country}\nAna,null,false,Brasil\nBruno,34,true,Portugal\n\nproducts{id,name,price}\n1,Caneta,2.5\n2,Caderno,15.0\n\nDecoded Dictionary:\n{'users': [{'name': 'Ana', 'age': None, 'active': False, 'country': 'Brasil'}, {'name': 'Bruno', 'age': 34, 'active': True, 'country': 'Portugal'}], 'products': [{'id': 1, 'name': 'Caneta', 'price': 2.5}, {'id': 2, 'name': \n'Caderno', 'price': 15.0}]}\n\nDecoded json:\n{\"users\": [{\"name\": \"Ana\", \"age\": null, \"active\": false, \"country\": \"Brasil\"}, {\"name\": \"Bruno\", \"age\": 34, \"active\": true, \"country\": \"Portugal\"}], \"products\": [{\"id\": 1, \"name\": \"Caneta\", \"price\": 2.5}, {\"id\": 2, \"name\": \n\"Caderno\", \"price\": 15.0}]}\n\nToon Plus Format (simple array):\n{name,age,active}\nAna,null,false\nBruno,34,true\n\nDecoded Dictionary (simple array):\n[{'name': 'Ana', 'age': None, 'active': False}, {'name': 'Bruno', 'age': 34, 'active': True}]\n\nDecoded json (simple array):\n[{\"name\": \"Ana\", \"age\": null, \"active\": false}, {\"name\": \"Bruno\", \"age\": 34, \"active\": true}]\n\nToon Plus Format (simple object):\n{name,age,is_student}\nJohn,30,false\n\nDecoded Dictionary (simple object):\n{'name': 'John', 'age': 30, 'is_student': False}\n\nDecoded json (simple object):\n{\"name\": \"John\", \"age\": 30, \"is_student\": false}\n\n=== dict inside dict (named simple object) ===\nUsers{name,age}\nAlice,25\n\ndecoded (named simple object): {'Users': {'name': 'Alice', 'age': 25}}\n\n=== list inside dict ===\nUsers{name,age,jobs}\nAlice,25,[Engineer, Writer]\n\ndecoded (list inside dict): {'Users': {'name': 'Alice', 'age': 25, 'jobs': ['Engineer', 'Writer']}}\n\n=== dict inside dict inside dict ===\nUsers{name,age,address}\nAlice,25,{city: Wonderland, zip: 12345}\n\ndecoded (dict inside dict inside dict): {'Users': {'name': 'Alice', 'age': 25, 'address': {'city': 'Wonderland', 'zip': 12345}}}\n\n=== simple list of numbers ===\n[1, 2, 4, 5, 6]\n\ndecoded (simple list of numbers): [1, 2, 4, 5, 6]\n\n```\n\n```python\n# test performance\nimport time\nfrom toon_plus import toon_plus\n\ndef measure(func, *args, **kwargs):\n    start = time.perf_counter()\n    result = func(*args, **kwargs)\n    end = time.perf_counter()\n    elapsed_ms = (end - start) * 1000  # convertendo para milissegundos\n    return result, elapsed_ms\n\ndata = \"\"\"\nusers{name,age,active,country}\nAna,null,false,Brasil\nBruno,34,true,Portugal\n\nproducts{id,name,price}\n1,Caneta,2.5\n2,Caderno,15.0\n\"\"\"\n\ndict_decoded, t_decode = measure(toon_plus.decode, data)  # function decode\nprint(f\"\\nDecoded toon plus [{t_decode:.3f} ms]:\")\nprint(dict_decoded)\n\ndata_toon_ = \"\"\"\nusers{name,age,active,country}\nAna,null,false,Brasil\nBruno,34,true,Portugal\n\nproducts{id,name,price}\n1,Caneta,2.5\n2,Caderno,15.0\n\"\"\"\n\ntoon_to_json, t_json_ = measure(toon_plus.decode2json, data_toon_)  # function decode2json\nprint(f\"\\nToon to json [{t_json_:.3f} ms]:\")\nprint(toon_to_json)\n```\n\n## Efficiency\n\nToon Plus is 11% to 21% more efficient than normal toon\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoreu%2Ftoon_plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoreu%2Ftoon_plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoreu%2Ftoon_plus/lists"}