Can I use "dots" in the form field name to (de)serialize a more complex JSON structure?
For example, if I want to send a JSON like this to my REST Service:
{
id: 1,
name: "Daniel",
telephones: ["12345", "678901"],
addresses: [
{id: 1, city: "Sao Paulo", street: "Av. Paulista", zipcode: "999"},
{id: 2, city: "Rio de Janeiro", street: "Av. Brasil", zipcode: "333"}
]
}
I would like to create a form like this:
<form id="frm-person">
<input type="hidden" name="id">
Name: <input type="text" name="name">
Telephones:
Home: <input type="text" name="telephones">
Mobile: <input type="text" name="telephones">
Home Address:
<input type="hidden" name="addresses.id">
<input type="text" name="addresses.city">
<input type="text" name="addresses.street">
<input type="text" name="addresses.zipcode">
Work Address:
<input type="hidden" name="addresses.id">
<input type="text" name="addresses.city">
<input type="text" name="addresses.street">
<input type="text" name="addresses.zipcode">
</form>
Is it possible with your library?
Can I use "dots" in the form field name to (de)serialize a more complex JSON structure?
For example, if I want to send a JSON like this to my REST Service:
I would like to create a form like this:
Is it possible with your library?