Re: Submitting forms as JSON

double quote are escaped in JSON, so are \n, \r, \t and others
see string: http://json.org/

Null could be <input name="some-null" type="null"> ? I wonder what's the
point to send a null value though, I'd use hidden with a value or a checkbox

the tricky case is probably wrong since you have twice the same name for
Amaze1 and Amaze2

it is explained that arrays, as soon as these contain a named property,
will be sent as object so wow:{such:{"value":"Amaze2", "1":"Amaze3"}}

unless I misunderstood your last question

regards



On Wed, Feb 26, 2014 at 1:03 AM, Innovimax W3C <innovimax+w3c@gmail.com>wrote:

> Very nice ! Clear ! Well written !
>
> Few details,
>
> How do you parse the following
>
> == With Double Quote ==
>
> <form enctype='application/json'>
>   <input name='fi"le' value='file'></form>
>
>
> == With \n (or any other ) ==
>
> <form enctype='application/json'>
>   <input name='fi&#xA;le' value='file'></form>
>
>
> == Null value ==
>
> There is no defined way to add a null value
>
> == Tricky case ==
> <form enctype='application/json'>
>   <input name='wow[such]' value='Amaze1'>  <input name='wow[such]' value='Amaze2'>  <input name='wow[such][1]' value='Amaze3'></form>
>
> Mohamed
>
>
> On Tue, Feb 25, 2014 at 5:02 PM, Robin Berjon <robin@w3.org> wrote:
>
>> Hi,
>>
>> I put together a small spec to enable having HTML form data submitted
>> directly as JSON, with structure. I'd be curious to hear your feedback:
>>
>>     http://darobin.github.io/formic/specs/json/
>>
>> Thanks!
>>
>> --
>> Robin Berjon - http://berjon.com/ - @robinberjon
>>
>>
>
>
> --
> Innovimax SARL
> Consulting, Training & XML Development
> 9, impasse des Orteaux
> 75020 Paris
> Tel : +33 9 52 475787
> Fax : +33 1 4356 1746
> http://www.innovimax.fr
> RCS Paris 488.018.631
> SARL au capital de 10.000 EURO
>

Received on Wednesday, 26 February 2014 17:47:20 UTC