I think it originates with the early web. JSON being a replacement for XML, and "document" being the general description for the response to a web server.