ReflectionsProjections/mm18

Deserialize JSON

Closed this issue · 0 comments

All GET / POST request data should be sent in as JSON. We need a function to take any GET / POST request data (it should handle both), and transform it into a key-value dictionary.

How the function will be used:
Server receives GET / POST request.
The GET / POST handler function calls the Deserialize JSON function before it decides how to handle the request.
The GET / POST handler function does something, passing on the Dictionary.

GET / POST Handler:
1. Call Deserialize JSON
2. Do something.

JSON Formatting
For consistency, all JSON input must conform to the following standards (ie the JSON passed in the GET / POST request).

  1. You cannot send an array as the base object (ie [ stuff, stuff2 ] ), it must be an object (ie { "myArray" : [ stuff, stuff 2 ] )

More might be added here later.