json_to_dart_class 1.2.0 copy "json_to_dart_class: ^1.2.0" to clipboard
json_to_dart_class: ^1.2.0 copied to clipboard

This Dart package, **json_to_dart_class**, facilitates the generation of Dart class files from JSON data. It provides a convenient way to convert JSON structures into corresponding Dart classes, makin [...]

example/json_to_dart_class_example.dart

import 'package:json_to_dart_class/json_to_dart_class.dart';

void main() async {
  var json = {
    "status": "success", 
    "age": 32, 
    "feed": {
      "len": 10, 
      "wd": "Sunny", 
      "speed": 25.0, 
      "location": {
        "address": "123 Main Street", 
        "postal_code": "12345",
        "city": "Miami", 
      },
      "childs": [
        {
          "name": "Emily", 
          "age": 8 
        },
        {
          "name": "David", 
          "age": 5 
        },
        {
          "name": "Sarah", 
          "age": 12 
        }
      ]
    }
  };
  await jsonToDart(
      json: json,
      className: 'persson',
      library: 'persson',
      folderPath: 'src/persson');
}
2
likes
130
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

This Dart package, **json_to_dart_class**, facilitates the generation of Dart class files from JSON data. It provides a convenient way to convert JSON structures into corresponding Dart classes, making it easier to work with JSON data in Dart applications.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

More

Packages that depend on json_to_dart_class