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 [...]

1.2.0 #

New features:

  • toMap method: Added a toMap method to generated classes, allowing easy conversion of the class instance back to a Dart Map object.
  • Code formatting: Improved code formatting for better readability and maintainability.
  • Automatic folder creation: The jsonToDart function now accepts a folder path argument. If the specified folder doesn't exist, it will be automatically created before generating the class files.

Example:

await jsonToDart(
  json: json,
  className: 'WeatherData',
  library: 'weather',
  folderPath: 'lib/bin/weather', // New folder will be created if it doesn't exist
);

1.1.0 #

  • Add fromOriginJson method.

1.0.0 #

  • Initial version.
1
likes
130
pub points
3%
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