Added functionality to receive JSON by POST rather than hard-coding it in the file