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

Can ordering guarantees be added to the docs? #144

Open
saurabhnanda opened this issue Jul 5, 2024 · 0 comments
Open

Can ordering guarantees be added to the docs? #144

saurabhnanda opened this issue Jul 5, 2024 · 0 comments

Comments

@saurabhnanda
Copy link

If the following form is submitted...

<input type="text' name="photos[][id]" value="1" />
<input type="text' name="photos[][caption]" value="caption1" />

<input type="text' name="photos[][id]" value="2" />
<input type="text' name="photos[][caption]" value="caption2" />

<input type="text' name="photos[][id]" value="3" />
<input type="text' name="photos[][caption]" value="caption3" />

... does the library guarantee that the resultant values of the HashMap inside Form { unForm :: HashMap Text [Text] } will be in the same order as submitted by the browser, i.e. is the following result guaranteed?

HashMap.fromList
  [ ("photos[][id]", ["1", "2", "3"])
  , ("photos[][caption]", ["caption1", "caption2", "caption3"])
  ]

There are some stable function variants, but somehow the documentation doesn't give the above clarity/comfort from my point of view.

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

1 participant