Re: Submitting forms as JSON

Rails actually already supports JSON parameters. In general, it uses
`accept-charset` on the client to force the browser to give it UTF-8
(trying to figure out and transcode other encodings is a huge headache; I
did most of this work in Rails 3, and `accept-charset` was like manna from
heaven).

Ideally, it would be sent as a Content-Type
"application/json;charset=utf-8" when provided an `accept-charset` of
"utf-8". I *believe* that if this was how it worked, existing Rails would
work out of the box. I can't speak for other server-side frameworks.

Yehuda Katz
(ph) 718.877.1325


On Tue, Feb 25, 2014 at 9:56 AM, Jonathan Kelly
<jonathank.kelly@gmail.com>wrote:

> Hi Robin, I took a couple of read throughs of this spec and it's super
> simple to follow (which is awesome for a non-expert at reading specs). Not
> to get away from the main gist but could something like this be prototyped
> in something like Polymer (or any framework that aims to extend DOM
> semantics)? I'm really tempted to try something like this but as you
> mention in the spec, its up to the server to check the encode type of the
> form before determining the parsing mechanics. Does this ultimately mean
> that server side languages would need to change to implement this spec in
> the future?
>
> Sincerely,
> Jon
>
> Jonathan Kelly * Web Developer
> Office 800.966.8800 x 6080
> Cell 973.536.8014
> www.thatguy.tv | http://www.richlinegroup.com |
> http://www.richlinecreative.com
>
>
> On Tue, Feb 25, 2014 at 12:53 PM, Andrea Giammarchi <
> andrea.giammarchi@gmail.com <andrea.giammarchi@gmail..com>> wrote:
>
>> This is awesome!!!! The only thing I believe is missing is the ability
>> to specify a compression encoding as gzip or deflate in order to boost
>> up repeated properties name as well as base64 data. All those thoughts
>> don't seem to be an issue (root type is fine as it is, name paths look
>> good too) . If kept simple, this might land pretty soon as polifill
>> too. Thanks for sharing!
>>
>> Sent from my Windows Phone From: Robin Berjon
>> Sent: 2/25/2014 8:03
>> To: public-nextweb@w3.org
>> Subject: Submitting forms as JSON
>> 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
>>
>>
>

Received on Tuesday, 25 February 2014 19:08:02 UTC