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

Added some testcases for an empty list and empty associative arrays #21

Merged
merged 1 commit into from
Sep 5, 2012

Conversation

hannesg
Copy link
Contributor

@hannesg hannesg commented Aug 13, 2012

Hi

the title says all. The RFC mentions only one example and is not very verbose about the handling of empty lists and assocs.

Thank you
Hannes

mnot added a commit that referenced this pull request Sep 5, 2012
Added some testcases for an empty list and empty associative arrays
@mnot mnot merged commit 73a3b75 into uri-templates:master Sep 5, 2012
@andreineculau
Copy link

Are you sure about the expansion of the {?empty_list} into ?empty_list= and similarly for the associative array?
As per the RFC definition, empty_list and empty_assoc variables are undefined, so then why would they be expanded, rather than omitted?

   A variable defined as a list value is considered undefined if the
   list contains zero members.  A variable defined as an associative
   array of (name, value) pairs is considered undefined if the array
   contains zero members or if all member names in the array are
   associated with undefined values.

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

Successfully merging this pull request may close these issues.

None yet

3 participants