I would like to report an issue concerning the generation of JSON Schema, which appears to differ between Python and other programming languages such as Rust, Dart, and Kotlin.
The problem arises when generating a Python class using the provided JSON Schema. In Python, the resulting variable types are unusable. For instance, the variable "parameters" is defined as a dictionary, where every value is expected to be None. However, in Rust (for example), the corresponding type is "JSON," not None.
Specifically, the issue lies in the type assigned to the dictionary values. In Python, they are consistently set to None, whereas in Rust, they are assigned the type "JSON." This inconsistency causes problems when using the "from_dict" function, as it checks that every value in the dictionary is None.
I believe addressing this discrepancy in JSON Schema generation between Python and other supported languages would greatly enhance the usability and compatibility of Quicktype. I hope this issue can be resolved to ensure a consistent experience for developers across all languages.
I would like to report an issue concerning the generation of JSON Schema, which appears to differ between Python and other programming languages such as Rust, Dart, and Kotlin.
The problem arises when generating a Python class using the provided JSON Schema. In Python, the resulting variable types are unusable. For instance, the variable "parameters" is defined as a dictionary, where every value is expected to be None. However, in Rust (for example), the corresponding type is "JSON," not None.
Specifically, the issue lies in the type assigned to the dictionary values. In Python, they are consistently set to None, whereas in Rust, they are assigned the type "JSON." This inconsistency causes problems when using the "from_dict" function, as it checks that every value in the dictionary is None.
I believe addressing this discrepancy in JSON Schema generation between Python and other supported languages would greatly enhance the usability and compatibility of Quicktype. I hope this issue can be resolved to ensure a consistent experience for developers across all languages.
JSON Schema
Python Output