Updated REST server to process JSON properly.