Skip to content
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

DictProperty Key Types? #138

Open
mikeholler opened this issue Oct 27, 2017 · 1 comment
Open

DictProperty Key Types? #138

mikeholler opened this issue Oct 27, 2017 · 1 comment

Comments

@mikeholler
Copy link

Is there support (or plans for support) to specify key types for DictProperty? I'd like to enforce a dict of int to MyJsonObject and I don't see a way of doing that with the current APIs.

@emord
Copy link
Contributor

emord commented Oct 27, 2017

Would using an ObjectProperty solve this? https://github.com/dimagi/jsonobject/blob/master/test/tests.py#L42 That code ensures each Feature has hair and eyes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants