{"id":28829276,"url":"https://github.com/ballerina-platform/module-ballerina-io","last_synced_at":"2026-02-13T23:03:58.694Z","repository":{"id":36980369,"uuid":"288615254","full_name":"ballerina-platform/module-ballerina-io","owner":"ballerina-platform","description":"Ballerina io Module","archived":false,"fork":false,"pushed_at":"2025-10-16T04:16:19.000Z","size":4300,"stargazers_count":115,"open_issues_count":0,"forks_count":54,"subscribers_count":69,"default_branch":"master","last_synced_at":"2025-10-17T06:59:37.402Z","etag":null,"topics":["ballerina","hacktoberfest","integration","io","wso2"],"latest_commit_sha":null,"homepage":"","language":"Ballerina","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ballerina-platform.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-08-19T02:38:22.000Z","updated_at":"2025-10-01T04:40:18.000Z","dependencies_parsed_at":"2023-10-03T12:23:37.599Z","dependency_job_id":"b1a42aa8-244b-4c4f-bc84-7d99a5ff7b2c","html_url":"https://github.com/ballerina-platform/module-ballerina-io","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/ballerina-platform/module-ballerina-io","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballerina-platform%2Fmodule-ballerina-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballerina-platform%2Fmodule-ballerina-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballerina-platform%2Fmodule-ballerina-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballerina-platform%2Fmodule-ballerina-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ballerina-platform","download_url":"https://codeload.github.com/ballerina-platform/module-ballerina-io/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballerina-platform%2Fmodule-ballerina-io/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29422287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T22:20:51.549Z","status":"ssl_error","status_checked_at":"2026-02-13T22:20:49.838Z","response_time":78,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ballerina","hacktoberfest","integration","io","wso2"],"created_at":"2025-06-19T05:12:39.296Z","updated_at":"2026-02-13T23:03:58.624Z","avatar_url":"https://github.com/ballerina-platform.png","language":"Ballerina","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ballerina I/O Library\n===================\n\n  [![Build](https://github.com/ballerina-platform/module-ballerina-io/actions/workflows/build-timestamped-master.yml/badge.svg)](https://github.com/ballerina-platform/module-ballerina-io/actions/workflows/build-timestamped-master.yml)\n  [![codecov](https://codecov.io/gh/ballerina-platform/module-ballerina-io/branch/master/graph/badge.svg)](https://codecov.io/gh/ballerina-platform/module-ballerina-io)\n  [![Trivy](https://github.com/ballerina-platform/module-ballerina-io/actions/workflows/trivy-scan.yml/badge.svg)](https://github.com/ballerina-platform/module-ballerina-io/actions/workflows/trivy-scan.yml)\n  [![GraalVM Check](https://github.com/ballerina-platform/module-ballerina-io/actions/workflows/build-with-bal-test-graalvm.yml/badge.svg)](https://github.com/ballerina-platform/module-ballerina-io/actions/workflows/build-with-bal-test-graalvm.yml)\n  [![GitHub Last Commit](https://img.shields.io/github/last-commit/ballerina-platform/module-ballerina-io.svg)](https://github.com/ballerina-platform/module-ballerina-io/commits/master)\n  [![Github issues](https://img.shields.io/github/issues/ballerina-platform/ballerina-standard-library/module/io.svg?label=Open%20Issues)](https://github.com/ballerina-platform/ballerina-standard-library/labels/module%2Fio)\n\nThis I/O library provides file read/write APIs and console print/read APIs. The file APIs allow read and write operations on different kinds of file types such as bytes, text, CSV, JSON, and XML. Further, these file APIs can be categorized as streaming and non-streaming APIs.\n\nThe following diagram depicts the overview architecture of the I/O package.\n\n![Overview](ballerina/docs/architecture.svg)\n\nThe file I/O operations can be categorized further based on the serialization and deserialization types such as:\n- Bytes I/O\n- Strings I/O\n- CSV I/O\n- JSON I/O\n- XML I/O\n\n### Console I/O\nThe console I/O APIs, which help you to read from the console as well as write to the console are as follows.\n- `io:print`\n- `io:println`\n- `io:readln`\n\n### Bytes I/O\nThe bytes I/O APIs provide the reading and writing APIs in both streaming and non-streaming ways. Those APIs are,\n- `io:fileReadBytes`\n- `io:fileReadBlocksAsStream`\n- `io:fileWriteBytes`\n- `io:fileWriteBlocksFromStream`\n\n### Strings I/O\nThe strings I/O APIs provide the reading and writing APIs in 3 different ways:\n1. Read the complete file content as a string and write a given string to a file\n2. Read the complete file content as a set of lines and write a given set of lines to a file\n3. Read the complete file content as a stream of lines and write a given stream of lines to a file\n\nThe strings I/O APIs are as follows:\n- `io:fileReadString`\n- `io:fileReadLines`\n- `io:fileReadLinesAsStream`\n- `io:fileWriteLines`\n- `io:fileWriteLinesFromStream`\n\n### CSV I/O\nThe CSV I/O APIs provide the reading and writing APIs in both streaming and non-streaming ways. Those APIs are:\n- `io:fileReadCsv`\n- `io:fileReadCsvAsStream`\n- `io:fileWriteCsv`\n- `io:fileWriteCsvFromStream`\n\n### JSON I/O\nThe JSON I/O APIs provide the reading and writing APIs for JSON content. Those APIs are:\n- `io:fileReadJson`\n- `io:fileWriteJson`\n\n### XML I/O\nThe XML I/O APIs provide the reading and writing APIs for XML content. Those APIs are:\n- `io:fileReadXml`\n- `io:fileWriteXml`\n\n## Issues and projects \n\nIssues and Projects tabs are disabled for this repository as this is part of the Ballerina Standard Library. To report bugs, request new features, start new discussions, view project boards, etc. please visit Ballerina Standard Library [parent repository](https://github.com/ballerina-platform/ballerina-standard-library). \n\nThis repository only contains the source code for the module.\n\n## Build from the source\n\n### Set up the prerequisites\n\n1. Download and install Java SE Development Kit (JDK) version 21 (from one of the following locations).\n\n   * [Oracle](https://www.oracle.com/java/technologies/downloads/)\n   \n   * [OpenJDK](https://adoptium.net/)\n   \n        \u003e **Note:** Set the JAVA_HOME environment variable to the path name of the directory into which you installed JDK.   \n1. Export Github Personal access token with read package permissions as follows,\n        \n        export packageUser=\u003cUsername\u003e\n        export packagePAT=\u003cPersonal access token\u003e\n\n### Build the source\n\nExecute the commands below to build from source.\n\n1. To build the library:\n   ```    \n   ./gradlew clean build\n   ```\n\n1. To run the integration tests:\n   ```\n   ./gradlew clean test\n   ```\n1. To build the module without the tests:\n   ```\n   ./gradlew clean build -x test\n   ```\n1. To debug module implementation:\n   ```\n   ./gradlew clean build -Pdebug=\u003cport\u003e\n   ./gradlew clean test -Pdebug=\u003cport\u003e\n   ```\n1. To debug the module with Ballerina language:\n   ```\n   ./gradlew clean build -PbalJavaDebug=\u003cport\u003e\n   ./gradlew clean test -PbalJavaDebug=\u003cport\u003e\n   ```\n1. Publish ZIP artifact to the local `.m2` repository:\n   ```\n   ./gradlew clean build publishToMavenLocal\n   ```\n1. Publish the generated artifacts to the local Ballerina central repository:\n   ```\n   ./gradlew clean build -PpublishToLocalCentral=true\n   ```\n1. Publish the generated artifacts to the Ballerina central repository:\n   ```\n   ./gradlew clean build -PpublishToCentral=true\n   ```\n\n## Contribute to Ballerina\n\nAs an open source project, Ballerina welcomes contributions from the community. \n\nFor more information, go to the [contribution guidelines](https://github.com/ballerina-platform/ballerina-lang/blob/master/CONTRIBUTING.md).\n\n## Code of conduct\n\nAll contributors are encouraged to read the [Ballerina Code of Conduct](https://ballerina.io/code-of-conduct).\n\n## Useful links\n\n* Chat live with us via our [Discord server](https://discord.gg/ballerinalang).\n* Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag.\n* For more information go to [the I/O Package](https://lib.ballerina.io/ballerina/io/latest).\n* For example demonstrations of the usage, go to [Ballerina By Examples](https://ballerina.io/learn/by-example/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fballerina-platform%2Fmodule-ballerina-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fballerina-platform%2Fmodule-ballerina-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fballerina-platform%2Fmodule-ballerina-io/lists"}