Closed hvishwanath closed 9 years ago
I've just released jsl==0.1.3 which adds a name
parameter to all fields. It can be used as follows:
class Entry(jsl.Document):
manifest_version = jsl.StringField(name='manifest-version', required=True)
file_type = jsl.StringField(name='file-type', enum=["mp3","ogg","wma"])
Awesome! Thank you!
I have a JSON that has keys with a hyphen. For example:
I am trying to write a jsl to generate a schema.
This produces a schema as below:
The keys under properties need to have a hyphen (manifest-version and manifest_version). How can I accomplish this, since a '-' is not allowed in the variable name. I explored the Options and MetaClasses that are collecting the fields, but cannot figure out how to change the field name in the resultant schema.