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

Fixed #29504 -- Clarified interpretation of integer JSONField lookups. #10077

Closed
wants to merge 1 commit into from

Conversation

ShaheedHaque
Copy link

As per Ticket 29504 this is an attempt to clarify the interpretation of "integer" keys.

@timgraham timgraham changed the title [Ticket 29504] Clarify interpretation of integer JSONField lookups. Fixed #29504 -- Clarified interpretation of integer JSONField lookups. Jun 21, 2018
Copy link
Member

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ShaheedHaque. Thanks for making the PR here.

Looking at it, I'm not sure it's necessary. I appreciate you ran into a confusion, but an array index is only ever going to be applicable if you're indexing into an array. (i.e. if it's a dictionary it just doesn't make sense to interpret the integer that way — it must be a (string) dictionary key lookup.)

I might be tempted by just a shift from will to may:

If the key is an integer, it may be interpreted as an index lookup in an array.

... but I'm not sure it's significant enough to trigger re-translations.

Not sure. Perhaps others can comment.

@ShaheedHaque
Copy link
Author

I'm happy to leave the matter to your discretion.

@timgraham
Copy link
Member

I think the current wording is okay.

@timgraham timgraham closed this Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants