Normal form submission vs. JSON

后端 未结 5 1991
生来不讨喜
生来不讨喜 2021-02-05 04:09

I see advantages of getting JSON response and formatting in client side but are there any advantages by using JSON for form submission compared to normal submission?

5条回答
  •  我在风中等你
    2021-02-05 04:43

    I didn't see any mention of file submission so I thought I'd chime in. FormData seems to be the standard way of submitting files to a server over AJAX. I didn't come across any solutions using JSON but there might be a way to serialize/deserialize files ...

提交回复
热议问题