The choices of sending data from forms json or form-data?

The question arose for processing data on the server:
if you take $_POST and $_GET parameters from forms or handlers to js in json format, what can be the consequences?

how to react to json_decode if they send just the horror(not in json format)?

Want to change the Frontend in Angular and the backend to write php

json_decode(file_get_contents('php://input')) // Get json
June 8th 19 at 17:10
1 answer
June 8th 19 at 17:12
if you take $_POST and $_GET parameters from forms or handlers to js in json format, what can be the consequences?
If you don't screw with the code, then no.

how to react to json_decode if they send just the horror(not in json format)?
Documentation.
what about the load because decode is not strongly jump? - judy_Johns commented on June 8th 19 at 17:15
If you are Yandex, you won't notice. - aniya commented on June 8th 19 at 17:18

Find more questions by tags PHP