json2builtvalue 2.0.1

json2builtvalue #

Generates Dart built_value classes from given JSON String.

Examples:

json2builtvalue -h
json2builtvalue -n todo -i todo.json -o todo.dart
echo '{
  "userId": 1,
  "id": 1,
  "title": "delectus aut autem",
  "completed": false
}' | dart bin/main.dart -n todo

Based on json2builtvalue

2.0.1 #

  • Add Example and docstring for Parser.

2.0.0 #

  • Embed libjson2builtvalue into this.

1.0.0 #

  • Initial release.

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate json2builtvalue

2. Use it

The package has the following executables:


$ json2builtvalue

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  json2builtvalue: ^2.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:json2builtvalue/json2builtvalue.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

We analyzed this package on Jul 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, other

Primary library: package:json2builtvalue/json2builtvalue.dart with components: io.

Health suggestions

Fix bin/json2builtvalue.dart. (-0.50 points)

Analysis of bin/json2builtvalue.dart reported 1 hint:

line 17 col 5: DO use curly braces for all flow control structures.

Format lib/src/string_class.dart.

Run dartfmt to format lib/src/string_class.dart.

Maintenance suggestions

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and json2builtvalue.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
args ^1.5.1 1.5.2
built_collection ^4.2.0 4.2.2
code_builder ^3.2.0 3.2.0
dart_style ^1.2.7 1.2.9
path ^1.4.1 1.6.2
recase ^2.0.1 2.0.1
tuple ^1.0.1 1.0.2
Transitive dependencies
analyzer 0.37.0
async 2.3.0
built_value 6.7.0
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
csslib 0.16.1
fixnum 0.10.9
front_end 0.1.20
glob 1.1.7
html 0.14.0+2
kernel 0.3.20
matcher 0.12.5
meta 1.1.7
package_config 1.0.5
pub_semver 1.4.2
quiver 2.0.3
source_span 1.5.5
stack_trace 1.9.3
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+12
yaml 2.1.16
Dev dependencies
pedantic ^1.6.0 1.8.0+1
test ^1.6.3

Admin