Move "type" in JSON to the root object.