Fix data output and parsing for the upload form

Fixed it so we output straight JSON.  Fixed the parsing code to handle
that.