{"id":16699335,"url":"https://github.com/ousttrue/sukonbu","last_synced_at":"2025-10-28T06:40:43.484Z","repository":{"id":136461195,"uuid":"224555772","full_name":"ousttrue/sukonbu","owner":"ousttrue","description":"JSON Schema converter","archived":false,"fork":false,"pushed_at":"2022-03-15T17:21:08.000Z","size":432,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T04:33:06.219Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/ousttrue.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-28T02:39:50.000Z","updated_at":"2022-11-17T17:26:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"10516ed4-b34b-478e-863d-fa6e932d704a","html_url":"https://github.com/ousttrue/sukonbu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ousttrue/sukonbu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousttrue%2Fsukonbu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousttrue%2Fsukonbu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousttrue%2Fsukonbu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousttrue%2Fsukonbu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ousttrue","download_url":"https://codeload.github.com/ousttrue/sukonbu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousttrue%2Fsukonbu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281397336,"owners_count":26493908,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"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":[],"created_at":"2024-10-12T18:06:39.595Z","updated_at":"2025-10-28T06:40:43.479Z","avatar_url":"https://github.com/ousttrue.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sukonbu\n\nJSON Schema converter.\nA code generator for GLTF read/write.\n\n## ToDo\n\n* [x] python generator(TypedDict)\n* [ ] (WIP)D generator\n* [ ] C# generator\n* [x] (WIP)C++ generator\n* [x] manipulate Extensions and Extras\n\n## Usage\n\n```\n$ python -m sukonbu PATH_TO_GLTF_JSONSCHEMA --lang python --dst PATH_TO_GENERATE_FILE\n```\n\n### extension handling\n\n```py\n    unlit_path = gltf_path.parent.parent.parent.parent / 'extensions/2.0/Khronos/KHR_materials_unlit/schema/gltf.KHR_materials_unlit.schema.json'\n    unlit = JsonSchemaParser(gltf_path.parent)\n    unlit.process(unlit_path)\n    js_parser.set('materials[].extensions.KHR_materials_unlit', unlit)\n```\n\n## python\n\n### python3 with typing\n\n```py\nclass MeshPrimitiveMode(Enum):\n    POINTS = 0\n    LINES = 1\n    LINE_LOOP = 2\n    LINE_STRIP = 3\n    TRIANGLES = 4\n    TRIANGLE_STRIP = 5\n    TRIANGLE_FAN = 6\n\n\nclass MeshPrimitiveRequired(TypedDict):\n    # A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data.\n    attributes: Dict[str, int]\n\n\nclass MeshPrimitiveOptional(TypedDict, total=False):\n    # The index of the accessor that contains the indices.\n    indices: int\n    # The index of the material to apply to this primitive when rendering.\n    material: int\n    # The type of primitives to render.\n    # default=4\n    mode: MeshPrimitiveMode\n    # An array of Morph Targets, each  Morph Target is a dictionary mapping attributes (only `POSITION`, `NORMAL`, and `TANGENT` supported) to their deviations in the Morph Target.\n    targets: List[Dict[str, int]]\n    # Dictionary object with extension-specific objects.\n    extensions: dict\n    # Application-specific data.\n    extras: dict\n\n\nclass MeshPrimitive(MeshPrimitiveRequired, MeshPrimitiveOptional):\n    pass\n```\n\n## c++\n\nJSON Schema is not compatible with statically typed serialization.\nFor example, a statically typed language cannot assign `null` to an `int` field.\nHowever, JSON Schema can skip unnecessary object properties, which are manipulated as `null`.\n\nSo I made this.\n\n* generate serialized containers(Force all object properties to be nullable)\n* generate deserializer for that containers\n* generate serializer for that containers(Skip unnecessary object properties)\n\n[gltf.h](gltfformat/include/gltfformat/gltf.h)\n  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fousttrue%2Fsukonbu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fousttrue%2Fsukonbu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fousttrue%2Fsukonbu/lists"}