GithubHelp home page GithubHelp logo

drylint / dart-quicktype Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chunlee-thong/dart-quicktype

0.0 0.0 0.0 2.18 MB

Convert JSON to Dart model class. Implement from Quicktype.

Home Page: https://dart-quicktype.netlify.app/

JavaScript 8.41% Dart 5.99% TypeScript 73.94% CSS 1.39% HTML 10.27%

dart-quicktype's Introduction

Dart QuickType

version: 2.1.6

A custom implemenation of JSON to Dart model class from QuickType.

Netlify Status

This project is configure to fit my use case only so the default behavior will be:

  • All fields are final
  • All fields are required
  • Has an option to generate toJSON,copyWith and toString
  • support Equatable and JsonSerialize
  • No freezed or hive

Type setting

When Dart class is generated from json, nullable or non-nullable field are define below.

Type Nullable default value
String setting ""
bool setting false
int setting 0
double setting 0
Array never []
Object always null
DateTime always null
  • Array can never be null
  • Object and DateTime always nullable
  • Other types can configure with checkbox setting

URL

Customize for your use case

  • edit Dart's quicktype config in custom_dart_renderer.ts
  • run npm run build to build from ts to vanilla js
  • test your change in index.html

dart-quicktype's People

Contributors

chunlee-thong avatar chunlee-aba avatar sagarmahobia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.