{"id":28892848,"url":"https://github.com/lumenvestige/json2dslformatmodel","last_synced_at":"2025-08-06T13:10:28.571Z","repository":{"id":299919856,"uuid":"1004006805","full_name":"LumenVestige/Json2DSLFormatModel","owner":"LumenVestige","description":"Fine-tuned from the T5 model, this project parses complex JSON structures and converts them into a Vue-like template DSL","archived":false,"fork":false,"pushed_at":"2025-06-19T00:30:47.000Z","size":2076,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-19T01:29:34.472Z","etag":null,"topics":["ai","dsl","json","t5-model"],"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/LumenVestige.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}},"created_at":"2025-06-18T01:26:52.000Z","updated_at":"2025-06-19T00:30:50.000Z","dependencies_parsed_at":"2025-06-19T01:39:49.699Z","dependency_job_id":null,"html_url":"https://github.com/LumenVestige/Json2DSLFormatModel","commit_stats":null,"previous_names":["lumenvestige/json2dslformatmodel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LumenVestige/Json2DSLFormatModel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LumenVestige%2FJson2DSLFormatModel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LumenVestige%2FJson2DSLFormatModel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LumenVestige%2FJson2DSLFormatModel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LumenVestige%2FJson2DSLFormatModel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LumenVestige","download_url":"https://codeload.github.com/LumenVestige/Json2DSLFormatModel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LumenVestige%2FJson2DSLFormatModel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261050697,"owners_count":23102556,"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":["ai","dsl","json","t5-model"],"created_at":"2025-06-21T02:06:48.698Z","updated_at":"2025-08-06T13:10:28.558Z","avatar_url":"https://github.com/LumenVestige.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp\u003e\n   \u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003cstrong\u003e👀\u003c/strong\u003e\n  \u003cimg src=\"https://profile-counter.glitch.me/LumenVestige.Json2DSLFormatModel/count.svg\" alt=\"Visitor Count\"  width=\"120\"/\u003e\n\u003c/p\u003e\n\n\n+ html访问环境：http://127.0.0.1:8888/dsl/test\n+ API接口:http://127.0.0.1:8099/dsl2\n    + 请求方式：post提交，参数为form-data格式，参数名为data,值为jsonstring\n    + curl url 示范例子(注意jsonstring转义问题)：\n        ```\n        curl -X POST http://127.0.0.1:8099/dsl2 -d \"data={\\\"a\\\":{\\\"b\\\":\\\"图片\\\",\\\"c\\\":[{\\\"d\\\":\\\"https://example.com/image1.jpg\\\",\\\"e\\\":\\\"风景\\\",\\\"f\\\":{\\\"g\\\":\\\"自然\\\",\\\"h\\\":\\\"山景\\\"}},{\\\"d\\\":\\\"https://example.com/image2.jpg\\\",\\\"e\\\":\\\"人物\\\",\\\"f\\\":{\\\"g\\\":\\\"肖像\\\",\\\"h\\\":\\\"微笑\\\"},\\\"i\\\":{\\\"j\\\":\\\"摄影师\\\",\\\"k\\\":\\\"张三\\\"}}]},\\\"l\\\":{\\\"m\\\":\\\"新闻\\\",\\\"n\\\":[{\\\"o\\\":\\\"国际\\\",\\\"p\\\":\\\" 俄乌冲突\\\",\\\"q\\\":\\\"最新进展\\\",\\\"r\\\":\\\"紧张局势升级\\\"},{\\\"o\\\":\\\"科技\\\",\\\"p\\\":\\\"AI发展\\\",\\\"q\\\":\\\"突破\\\",\\\"s\\\":\\\"自动驾驶\\\"}],\\\"t\\\":{\\\"u\\\":\\\"国内\\\",\\\"v\\\":\\\"经济\\\",\\\"w\\\":\\\"政策调整\\\",\\\"x\\\":\\\"促进增长\\\"}},\\\"y\\\":{\\\"z\\\":\\\"关于我们\\\",\\\"aa\\\":\\\"公司简介\\\",\\\"ab\\\":\\\"我们是一家专注于科技创新的公司\\\",\\\"ac\\\":{\\\"ad\\\":\\\"团队\\\",\\\"ae\\\":\\\"精英\\\",\\\"af\\\":\\\"专业\\\",\\\"ag\\\":\\\"热情\\\"},\\\"ah\\\":{\\\"ai\\\":\\\"联系方式\\\",\\\"aj\\\":\\\"电话\\\",\\\"ak\\\":\\\"123-456-7890\\\",\\\"al\\\":\\\"邮箱\\\",\\\"am\\\":\\\"info@example.com\\\"}},\\\"an\\\":{\\\"ao\\\":\\\"产品列表\\\",\\\"ap\\\":[{\\\"aq\\\":\\\"产品1\\\",\\\"ar\\\":\\\"智能音箱\\\",\\\"as\\\":\\\"https://example.com/product1.jpg\\\",\\\"at\\\":\\\"语音助手\\\"},{\\\"aq\\\":\\\"产品2\\\",\\\"ar\\\":\\\"智能手表\\\",\\\"as\\\":\\\"https://example.com/product2.jpg\\\",\\\"at\\\":\\\"健康监测\\\"},{\\\"aq\\\":\\\"产品3\\\",\\\"ar\\\":\\\"智能眼镜\\\",\\\"as\\\":\\\"https://example.com/product3.jpg\\\",\\\"at\\\":\\\"AR体验\\\",\\\"au\\\":{\\\"av\\\":\\\"特色\\\",\\\"aw\\\":\\\"高清显示\\\"}}]}}\"\n        ```\n    + python \n        \n        ```  \n        import json\n        import requests\n        url = \"http://127.0.0.1:8099/dsl2\"\n        data = {\n            \"a\": {\n                \"b\": \"图片\",\n                \"c\": [{\n                    \"d\": \"https://example.com/image1.jpg\",\n                    \"e\": \"风景\",\n                    \"f\": {\n                        \"g\": \"自然\",\n                        \"h\": \"山景\"\n                    }\n                }, {\n                    \"d\": \"https://example.com/image2.jpg\",\n                    \"e\": \"人物\",\n                    \"f\": {\n                        \"g\": \"肖像\",\n                        \"h\": \"微笑\"\n                    },\n                    \"i\": {\n                        \"j\": \"摄影师\",\n                        \"k\": \"张三\"\n                    }\n                }]\n            },\n            \"l\": {\n                \"m\": \"新闻\",\n                \"n\": [{\n                    \"o\": \"国际\",\n                    \"p\": \" 俄乌冲突\",\n                    \"q\": \"最新进展\",\n                    \"r\": \"紧张局势升级\"\n                }, {\n                    \"o\": \"科技\",\n                    \"p\": \"AI发展\",\n                    \"q\": \"突破\",\n                    \"s\": \"自动驾驶\"\n                }],\n                \"t\": {\n                    \"u\": \"国内\",\n                    \"v\": \"经济\",\n                    \"w\": \"政策调整\",\n                    \"x\": \"促进增长\"\n                }\n            },\n            \"y\": {\n                \"z\": \"关于我们\",\n                \"aa\": \"公司简介\",\n                \"ab\": \"我们是一家专注于科技创新的公司\",\n                \"ac\": {\n                    \"ad\": \"团队\",\n                    \"ae\": \"精英\",\n                    \"af\": \"专业\",\n                    \"ag\": \"热情\"\n                },\n                \"ah\": {\n                    \"ai\": \"联系方式\",\n                    \"aj\": \"电话\",\n                    \"ak\": \"123-456-7890\",\n                    \"al\": \"邮箱\",\n                    \"am\": \"info@example.com\"\n                }\n            },\n            \"an\": {\n                \"ao\": \"产品列表\",\n                \"ap\": [{\n                    \"aq\": \"产品1\",\n                    \"ar\": \"智能音箱\",\n                    \"as\": \"https://example.com/product1.jpg\",\n                    \"at\": \"语音助手\"\n                }, {\n                    \"aq\": \"产品2\",\n                    \"ar\": \"智能手表\",\n                    \"as\": \"https://example.com/product2.jpg\",\n                    \"at\": \"健康监测\"\n                }, {\n                    \"aq\": \"产品3\",\n                    \"ar\": \"智能眼镜\",\n                    \"as\": \"https://example.com/product3.jpg\",\n                    \"at\": \"AR体验\",\n                    \"au\": {\n                        \"av\": \"特色\",\n                        \"aw\": \"高清显示\"\n                    }\n                }]\n            }\n        }\n        headers = {\"Content-Type\": \"application/x-www-form-urlencoded\"}\n        response = requests.post(url, data={\"data\": json.dumps(data, ensure_ascii=True)})\n        print(response.status_code)\n        print(response.text)\n        ```\n\n+ 页面预览：![](./doc/预览.png)\n+ 简介\n    + 基于 T5 模型微调，可以解析有一定复杂层次的 JSON 数据结构，并转为类VUE模板DSL描述语言，适用于列表页、落地页等 JSON 格式。\n+ 使用说明\n    + 试试手气:随机抽取一条样本数据（列表页或落地页 JSON 数据）进行模型推理测试。\n    + 开始推理:使用模型推理。\n+ 支持标签：\n```\n    布局类型：block，flex，list，li_item，card\n    文本类型：title，paragraph，text，bold_text，small_text，italic_text，address\n    资源类型：img，radian_img，video，media，\n    链接类型：link\n```\n+ 支持属性：\n```\n    布局属性：flex-justify-content，flex-align-items\n    内容属性：content，src，href\n    逻辑属性：for，if，else-if，else\n    其他属性：border-radius\n```\n+ 服务架构：![](./doc/服务架构.jpg)\n+ 依赖库安装：\n```\n    pip install requests\n    pip install transformers\n    pip install beautifulsoup4\n    pip install jsonfixer\n    pip install psutil gputil websockets\n    pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121\n    npm install pm2 -g\n```\n+ 启动服务：\n```\n    cd ./workspace\n    sh ./start.sh\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flumenvestige%2Fjson2dslformatmodel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flumenvestige%2Fjson2dslformatmodel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flumenvestige%2Fjson2dslformatmodel/lists"}