-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema for key-value lists? #53
Comments
Can you show an example of what you mean? A dictionary schema should already suffice if I understand correctly. |
I want users to specify something like (
monday: (location: "home", mood: "good"),
tuesday: (location: "office", mood: "neutral"),
"thursday afternoon": (location: "dentist", mood: "anxious"),
) Essentially, I want to apply a schema to the dictionary's values, regardless of the key. In most cases, the keys are chosen by users, so they can't be known beforehand. The existing So far, I have been working around it with a two schemas in parse, the first ensuring it is a dictionary and converting using |
Ok, I see. I'm sure we could add this as a new schema type, but in theory the building blocks should already be there by creating your own schema. I've tried around a bit, but I must admit that I couldn't really get it to work correctly at the moment. We'll see if @jamesrswift responds in the near future regarding the next release in wake of Typst 0.13, valkyrie ought to get a proper manual. |
I've had a few cases of schemas where I want users to specify a list of key-value pairs with unique keys as a dictionary. Apart from being unique, I don't have any requirements on the keys, but all values should follow a common schema.
However, valkyrie does not support this use case currently, as it seems. Would this be something you would consider?
The text was updated successfully, but these errors were encountered: