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.

pub package License: MIT

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

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