Skip to content

Scalar to Array/Object casting #16

@rodneyrehm

Description

@rodneyrehm

Without having fully understood the encoding path algorithm, I'm wondering how the following converts to JSON:

<input name="mix" value="alpha">
<input name="mix[0]" value="bravo">
<!--
  { mix: ["bravo"] } OR
  { mix: {"": "alpha", "0": "bravo"} }
  mix=alpha&mix[0]=bravo
-->

considering that two name="mix" elements make an array, do two name="mix[0]" make an array as well? If so, this kind of breaks my model of accessing arrays

<input name="mix[0]" value="alpha">
<input name="mix[0]" value="bravo">
<!--
  { mix: ["bravo"] } OR
  { mix: [["alpha", "bravo"]] } OR
  { mix: {"": ["alpha", "bravo"]} }
  mix=alpha&mix[0]=bravo
-->

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions