Arrays, Serialization, JSON and such....

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
silence's picture

In the story here, It was finally decided that we will be using JSON for passing the "data" from client to server. As discussed, we'll be storing details in a JS object array in client. Robert had said that it is preferable to convert JS to php on server.

  1. What are the scenarios where serialized JS is prefered over php on server? Basically that answers why we should transfer the data in JS format instead of PHP?
  2. Now, once we have the "data" to transfer, What are the possible ways to transfer this from client to server? Is form POST enough or is thr something else that can be used?