arXiv 建筑语义标准论文· Thomas Hirsch·· 2026-05-19AI 评分46
使用JSON Schema与Pydantic实现Project Haystack网格类型检查
Type Checking Project Haystack Grids using JSON Schema and Pydantic
AI 导读
针对建筑本体Project Haystack标签使用模糊、自动验证能力有限、集成门槛较高的痛点,一项研究推出基于Python的配套工具链,可实现其网格类型检查。
正文
Abstract:Ontologies enable scalable energy services in buildings by supporting interoperability and automation. Project Haystack is a building ontology that is widely adopted due to its flexible, tag-based semantic model, openness, and extensibility, but suffers from ambiguous tag usage and limited automated validation. Although Project Haystack is formally open, its reliance on custom file formats and domain-specific languages that originate from the Haxall ecosystem creates a de facto barrier to integration. In this paper, we address these limitations by introducing a Python-based toolchain for Haystack. We present (i) a parser for Haystack definition files (Trio file format), and (ii) a code generator that derives Pydantic models and JSON Schema definitions from these parsed specifications. The resulting models enable static type checking and enable structural validation of Haystack grids within Python, as well as schema-based validation of JSON representations outside the Python ecosystem. All tools, generated models, and schemas are released publicly under an open-source license, with the goal of strengthening the Haystack ecosystem and opening a practical pathway beyond its current technical boundaries.
| Subjects: | Programming Languages (cs.PL); Artificial Intelligence (cs.AI); Software Engineering (cs.SE) |
| Cite as: | arXiv:2606.24891 [cs.PL] |
| (or arXiv:2606.24891v1 [cs.PL] for this version) | |
| https://doi.org/10.48550/arXiv.2606.24891 arXiv-issued DOI via DataCite |
Submission history
From: Thomas Hirsch [view email]
[v1]
Tue, 19 May 2026 15:07:37 UTC (38 KB)
来源:arXiv 建筑语义标准论文 · arxiv.org