Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

polymer-ajax: properly serialize nested objects/arrrays #33

@ebidel

Description

@ebidel

Demo: http://jsbin.com/AVOTUTAC/1/edit

I'm not sure the right answer, but nested objects/arrays get serialized as strings when they're URL encoded by the element.

<polymer-ajax id="ajax" params="{{params}}" method="post" ...></polymer-ajax>
...
this.params = {
  credential: {
    username: "ebidel",
    password: "abc"
  }
}

produces:

...&credential=%5Bobject%20Object%5D

Instead, we could do basic parameterizing for arrays and objects...?

credential = [1,2,3] -> &credential0=1&credential1=2&credential2=3
credential = {username="ebidel", password:"abc"} -> &credential_ebidel=ebidel&credential_password=abc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions