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');
}
1
likes
130
pub points
45%
popularity

Publisher

unverified uploader

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)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on json_to_dart_class