CSV to JSON Converter API - Dart/Flutter Client
CSV to JSON Converter parses raw CSV text into an array of JSON objects with column names and row counts. It handles comma, semicolon, tab, or pipe delimiters, with optional header row detection.
This is the Dart/Flutter client for the CSV to JSON Converter API.
Installation
Add this to your pubspec.yaml:
dependencies:
apiverve_csvtojson: ^1.2.2
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage
import 'package:apiverve_csvtojson/apiverve_csvtojson.dart';
void main() async {
final client = CsvtojsonClient('YOUR_API_KEY');
try {
final response = await client.execute({
'csv': 'name,age,city
John Doe,30,New York
Jane Smith,25,Los Angeles',
'delimiter': ',',
'has_header': true
});
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response
{
"status": "ok",
"error": null,
"data": {
"row_count": 2,
"column_count": 3,
"columns": [
"name",
"age",
"city"
],
"inferredTypes": {
"name": "string",
"age": "integer",
"city": "string"
},
"json": [
{
"name": "John Doe",
"age": "30",
"city": "New York"
},
{
"name": "Jane Smith",
"age": "25",
"city": "Los Angeles"
}
]
}
}
API Reference
- API Home: CSV to JSON Converter API
- Documentation: docs.apiverve.com/ref/csvtojson
Authentication
All requests require an API key. Get yours at apiverve.com.
License
MIT License - see LICENSE for details.
Built with Dart for APIVerve
Libraries
- apiverve_csvtojson
- CSV to JSON Converter API client for Dart/Flutter