{"id":{"repo_id":"uvic","oai_identifier":"oai:dspace.library.uvic.ca:1828/23745"},"canonical_url":"https://search.ndltd.org/etd/uvic/oai:dspace.library.uvic.ca:1828/23745","repository":{"repo_id":"uvic","name":"University of Victoria (Canada)","base_url":"https://dspace.library.uvic.ca/server/oai/request"},"display":{"title":"Specification-driven generation of type-safe python configuration classes for JSON inputs","abstract":"Modern scientific and engineering libraries often use JSON configuration files to run simulations and workflows. JSON is readable and widely supported, but real configuration files can be hard to write correctly because they may have deep nesting, lists, optional and required fields, fixed choices, and numeric limits. In many libraries, these rules are described in a separate input specification file, but developers usually create the type-safe interface and validation code by hand. This can repeat the same logic, become inconsistent when the specification changes, and lead to unclear error messages. This thesis introduces a system that takes the JSON input specification as the main reference and automatically generates strongly typed Python configuration classes from it. The generated classes are organized in the same structure as the specification using nested classes, and users can set values with normal attribute access to ensure each value is placed in the correct part of the specification. Validation is built into both the constructors and the property setters. This means whenever a value is given, the system checks its type and rules (for example, valid ranges, allowed options, or required file extensions). It also allows complex parts of the configuration to be filled step by step by setting their child properties. The system shows which fields are required using the generated documentation, and it also provides a report method that finds any missing required values before saving. After the configuration is complete, the objects are converted back into JSON-compatible output that matches the specification by design and can be used by other libraries. Internally, the approach builds an intermediate tree from specification pointers and then generates the class from it. It supports heterogeneous lists with wildcard routing and polymorphic variables with multiple allowable shapes. Robustness is tested by making controlled changes to the specification and running failure-case tests. The results show that the system reliably works with realistic patterns and clearly detects unsupported types and problems when the specification hierarchy is in the wrong order.","abstract_html":"Modern scientific and engineering libraries often use JSON configuration files to run simulations and workflows. JSON is readable and widely supported, but real configuration files can be hard to write correctly because they may have deep nesting, lists, optional and required fields, fixed choices, and numeric limits. In many libraries, these rules are described in a separate input specification file, but developers usually create the type-safe interface and validation code by hand. This can repeat the same logic, become inconsistent when the specification changes, and lead to unclear error messages. This thesis introduces a system that takes the JSON input specification as the main reference and automatically generates strongly typed Python configuration classes from it. The generated classes are organized in the same structure as the specification using nested classes, and users can set values with normal attribute access to ensure each value is placed in the correct part of the specification. Validation is built into both the constructors and the property setters. This means whenever a value is given, the system checks its type and rules (for example, valid ranges, allowed options, or required file extensions). It also allows complex parts of the configuration to be filled step by step by setting their child properties. The system shows which fields are required using the generated documentation, and it also provides a report method that finds any missing required values before saving. After the configuration is complete, the objects are converted back into JSON-compatible output that matches the specification by design and can be used by other libraries. Internally, the approach builds an intermediate tree from specification pointers and then generates the class from it. It supports heterogeneous lists with wildcard routing and polymorphic variables with multiple allowable shapes. Robustness is tested by making controlled changes to the specification and running failure-case tests. The results show that the system reliably works with realistic patterns and clearly detects unsupported types and problems when the specification hierarchy is in the wrong order.","abstract_has_math":false,"creators":["Gilanilarimi, Mohsen"],"institution":null,"degree_name":null,"degree_level":"Master of Science MSc","degree_discipline":null,"degree_department":"Department of Computer Science","school":null,"contributors":[],"advisors":["Schneider, Teseo"],"committee_chairs":[],"committee_members":[],"year":2026,"date_issued":"2026","date_published":"2026","updated_at":"2026-11-19T09:41:11Z","subjects":["python class generation","JSON input","specifications","validation"],"languages":["en","English"],"rights":["Available to the World Wide Web"],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://hdl.handle.net/1828/23745","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/1828/23745","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","download_url":null,"download_label":null,"download_source":null,"access_status":null,"embargo_until":null,"access_note":null},"source_record":{"url":"https://dspace.library.uvic.ca/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Adspace.library.uvic.ca%3A1828%2F23745","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.supervisor","label":"Supervisor","values":["Schneider, Teseo"]},{"key":"dc:creator","label":"Author","values":["Gilanilarimi, Mohsen"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2026-04-28T20:50:39Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2026-04-28T20:50:39Z"]},{"key":"dc:date.issued","label":"Date","values":["2026"]},{"key":"dc:type","label":"Dc Type","values":["Thesis"]},{"key":"thesis:degree_department","label":"Department","values":["Department of Computer Science"]},{"key":"thesis:degree_level","label":"Degree Level","values":["Master of Science MSc"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["python class generation","JSON input","specifications","validation"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["English"]},{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]},{"key":"dc:rights","label":"Dc Rights","values":["Available to the World Wide Web"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/1828/23745"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Modern scientific and engineering libraries often use JSON configuration files to run simulations and workflows. JSON is readable and widely supported, but real configuration files can be hard to write correctly because they may have deep nesting, lists, optional and required fields, fixed choices, and numeric limits. In many libraries, these rules are described in a separate input specification file, but developers usually create the type-safe interface and validation code by hand. This can repeat the same logic, become inconsistent when the specification changes, and lead to unclear error messages. This thesis introduces a system that takes the JSON input specification as the main reference and automatically generates strongly typed Python configuration classes from it. The generated classes are organized in the same structure as the specification using nested classes, and users can set values with normal attribute access to ensure each value is placed in the correct part of the specification. Validation is built into both the constructors and the property setters. This means whenever a value is given, the system checks its type and rules (for example, valid ranges, allowed options, or required file extensions). It also allows complex parts of the configuration to be filled step by step by setting their child properties. The system shows which fields are required using the generated documentation, and it also provides a report method that finds any missing required values before saving. After the configuration is complete, the objects are converted back into JSON-compatible output that matches the specification by design and can be used by other libraries. Internally, the approach builds an intermediate tree from specification pointers and then generates the class from it. It supports heterogeneous lists with wildcard routing and polymorphic variables with multiple allowable shapes. Robustness is tested by making controlled changes to the specification and running failure-case tests. The results show that the system reliably works with realistic patterns and clearly detects unsupported types and problems when the specification hierarchy is in the wrong order."]},{"key":"dc:description.scholarlevel","label":"Dc Description Scholarlevel","values":["Graduate"]},{"key":"dc:title","label":"Title","values":["Specification-driven generation of type-safe python configuration classes for JSON inputs"]}]}],"canonical_facts":{"dc:contributor.supervisor":["Schneider, Teseo"],"dc:creator":["Gilanilarimi, Mohsen"],"dc:date.accessioned":["2026-04-28T20:50:39Z"],"dc:date.available":["2026-04-28T20:50:39Z"],"dc:date.issued":["2026"],"dc:description.abstract":["Modern scientific and engineering libraries often use JSON configuration files to run simulations and workflows. JSON is readable and widely supported, but real configuration files can be hard to write correctly because they may have deep nesting, lists, optional and required fields, fixed choices, and numeric limits. In many libraries, these rules are described in a separate input specification file, but developers usually create the type-safe interface and validation code by hand. This can repeat the same logic, become inconsistent when the specification changes, and lead to unclear error messages. This thesis introduces a system that takes the JSON input specification as the main reference and automatically generates strongly typed Python configuration classes from it. The generated classes are organized in the same structure as the specification using nested classes, and users can set values with normal attribute access to ensure each value is placed in the correct part of the specification. Validation is built into both the constructors and the property setters. This means whenever a value is given, the system checks its type and rules (for example, valid ranges, allowed options, or required file extensions). It also allows complex parts of the configuration to be filled step by step by setting their child properties. The system shows which fields are required using the generated documentation, and it also provides a report method that finds any missing required values before saving. After the configuration is complete, the objects are converted back into JSON-compatible output that matches the specification by design and can be used by other libraries. Internally, the approach builds an intermediate tree from specification pointers and then generates the class from it. It supports heterogeneous lists with wildcard routing and polymorphic variables with multiple allowable shapes. Robustness is tested by making controlled changes to the specification and running failure-case tests. The results show that the system reliably works with realistic patterns and clearly detects unsupported types and problems when the specification hierarchy is in the wrong order."],"dc:description.scholarlevel":["Graduate"],"dc:identifier.uri":["https://hdl.handle.net/1828/23745"],"dc:language":["English"],"dc:language.iso":["en"],"dc:rights":["Available to the World Wide Web"],"dc:subject":["python class generation","JSON input","specifications","validation"],"dc:title":["Specification-driven generation of type-safe python configuration classes for JSON inputs"],"dc:type":["Thesis"],"thesis:degree_department":["Department of Computer Science"],"thesis:degree_level":["Master of Science MSc"]},"updated_at":"2026-11-19T09:41:11Z"}