{"id":20837590,"url":"https://github.com/taojy123/dnode","last_synced_at":"2026-04-16T09:34:06.264Z","repository":{"id":57423104,"uuid":"100485409","full_name":"taojy123/dnode","owner":"taojy123","description":"像读写对象属性一样读写 json","archived":false,"fork":false,"pushed_at":"2020-06-05T15:45:20.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-25T21:18:19.210Z","etag":null,"topics":["json","python"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/dnode/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taojy123.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-16T12:11:00.000Z","updated_at":"2020-06-05T15:45:22.000Z","dependencies_parsed_at":"2022-09-06T01:22:29.319Z","dependency_job_id":null,"html_url":"https://github.com/taojy123/dnode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/taojy123/dnode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taojy123%2Fdnode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taojy123%2Fdnode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taojy123%2Fdnode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taojy123%2Fdnode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taojy123","download_url":"https://codeload.github.com/taojy123/dnode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taojy123%2Fdnode/sbom","scorecard":{"id":868266,"data":{"date":"2025-08-11","repo":{"name":"github.com/taojy123/dnode","commit":"37a0eb8d41bc18fd3726c8b0906830086e52457a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-24T03:22:55.331Z","repository_id":57423104,"created_at":"2025-08-24T03:22:55.331Z","updated_at":"2025-08-24T03:22:55.331Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31880346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["json","python"],"created_at":"2024-11-18T01:08:03.204Z","updated_at":"2026-04-16T09:34:06.239Z","avatar_url":"https://github.com/taojy123.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dnode\n\n\n`$ pip install dnode`\n\n```python\n\nfrom dnode import *\n\n\nprint('============== load data ===============')\n\ndata = {\n    'a': 1,\n    'b': {'b1': 3},\n    'c': {'c1': 1, 'c2': {'c22': 22}},\n    'd': ['d1', 'd2', 'd3'],\n    'e': [{'ee': 1}, {'ee': 2}, {'ee': 3}],\n    'f': [['f11', 'f12'], ['f21', 'f22']],\n    'g': [[{'gg': 11}, {'gg': 12}], [{'gg': 21}, {'gg': 22}]],\n}\n\nobj = DNode(data)\n\nprint(obj.to_dict())\nassert obj.to_dict() == data\n\nprint('=========== print object ===============')\n\nprint(obj)\nobj.pprint()\n\nprint('============= print json ===============')\n\nprint(obj.json)  \n# or print(obj.dumps(indent=4))\n\nprint('=========== test getattr ===============')\n\nassert obj.a == 1\nassert obj.b.b1 == 3\nassert obj.c.c2 == {'c22': 22} == DNode({'c22': 22})\nassert obj.d[1] == 'd2'\nassert obj.e[1].ee == 2\nassert obj.f[0][0] == 'f11'\nassert obj.g[0][0].gg == 11\nassert obj.h == None\n\nprint('=========== test setattr ===============')\n\nobj.a = 'change_a'\nobj.b.b1 = 'change_b'\nobj.c.c2.c22 = 'change_c'\nobj.d[1] = 'change_d'\nobj.e[1].ee = 'change_e'\nobj.f[0][0] = 'change_f'\nobj.g[0][0].gg = 'change_g'\n\ndata = obj.to_dict()\nassert data['a'] == 'change_a'\nassert data['b']['b1'] == 'change_b'\nassert data['c']['c2']['c22'] == 'change_c'\nassert data['d'][1] == 'change_d'\nassert data['e'][1]['ee'] == 'change_e'\nassert data['f'][0][0] == 'change_f'\nassert data['g'][0][0]['gg'] == 'change_g'\n\nprint('======== test set non-json type =========')\n\nobj.a = {1, 2, 3}\ndata = obj.to_dict()\nassert data['a'] == None\n\nprint('============== test clear ===============')\n\nobj.clear()\nobj.pprint()\n\nprint('============== list init ================')\n\ndata = '[ {\"a\": 1}, [{\"b\": 2}, {\"c\": 3}] ]'\nrs = DNode(data)\nprint(rs)\nassert isinstance(rs, list)\nassert rs[0].a == 1\nassert rs[1][0].b == 2\nassert rs[1][1].c == 3\n\nprint('=========================================')\n\nprint('\\n\\n-------------- test SMNode ---------------')\n\nprint('========= test STRUCT_FIELDS ============')\n\nobj = SMNode({})\nSMNode.STRUCT_FIELDS = set(['aaa', 'bbb'])\nobj.aaa = 123\nobj.ccc = 456\nprint(obj.json)  \nprint('`ccc` should not in the output')\n\nprint('=========================================')\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaojy123%2Fdnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaojy123%2Fdnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaojy123%2Fdnode/lists"}