Skip to content

Commit

Permalink
Update csv api doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SasinduDilshara committed Aug 20, 2024
1 parent 1df7169 commit 67530ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ballerina/csv_api.bal
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public isolated function parseString(string csvString, ParseOptions options = {}
# Converts byte[] to subtype of `record{}[]` or `anydata[][]`.
# ```ballerina
# byte[] csvBytes = check io:fileReadBytes("example.csv");
#
# record{int id; string name;}[] csv1 = check csv:parseBytes(csvBytes);
# [int, string][] csv2 = check csv:parseBytes(csvBytes);
# record{|int id;|}[] csv3 = check csv:parseBytes(csvBytes);
Expand All @@ -54,10 +55,13 @@ public isolated function parseBytes(byte[] csvBytes, ParseOptions options = {},
# ```ballerina
# stream<byte[], io:Error?> csvByteStream = check io:fileReadBlocksAsStream("example.csv");
# record{int id; string name;}[] csv1 = check csv:parseStream(csvByteStream);
#
# stream<byte[], io:Error?> csvByteStream2 = check io:fileReadBlocksAsStream("example.csv");
# [int, string][] csv2 = check csv:parseStream(csvByteStream2);
#
# stream<byte[], io:Error?> csvByteStream3 = check io:fileReadBlocksAsStream("example.csv");
# record{|int id;|}[] csv3 = check csv:parseStream(csvByteStream3);
#
# stream<byte[], io:Error?> csvByteStream4 = check io:fileReadBlocksAsStream("example.csv");
# record{int id;}[] csv4 = check csv:parseStream(csvByteStream4, {skipLines: [1]});
# ```
Expand Down

0 comments on commit 67530ea

Please sign in to comment.