json_java_converter 0.3.2

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 42

JsonJavaConverter

A library for converting between Dart types and Java types, using JSON serilaization

Usage

A simple example, with one serializable entity (Note that any property ) you want to process must be annotated with Remote(), and any class with RemoteClass() and the Java class name.

season.dart:

import 'package:json_java_converter/json_java_converter.dart';

@RemoteClass("com.maths22.ftc.entities.Season")
class Season {
  @Remote()
  String id;

  @Remote()
  String name;

  @Remote()
  String slug;

  @Remote()
  String year;
}

To initialize the converters, you must call registerJsonConverters() in the main method of your application (typically in web/main.dart).

Add json_java_converter to the list of transformers in your pubspec.yaml.

Usage of converter:

converter = new RpcConverter();
converter.convertToJson(a); //Produces list/map/native type
converter.convertFromJson(response); //Produces Dart object

Changelog

0.3.0

  • Added Enum support

1. Depend on it

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


dependencies:
  json_java_converter: "^0.3.2"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:json_java_converter/json_java_converter.dart';
        
Version Uploaded Documentation Archive
0.3.2 Sep 14, 2016 Go to the documentation of json_java_converter 0.3.2 Download json_java_converter 0.3.2 archive
0.3.1 Sep 14, 2016 Go to the documentation of json_java_converter 0.3.1 Download json_java_converter 0.3.1 archive
0.3.0+2 Sep 14, 2016 Go to the documentation of json_java_converter 0.3.0+2 Download json_java_converter 0.3.0+2 archive
0.3.0+1 Sep 13, 2016 Go to the documentation of json_java_converter 0.3.0+1 Download json_java_converter 0.3.0+1 archive
0.3.0 Sep 13, 2016 Go to the documentation of json_java_converter 0.3.0 Download json_java_converter 0.3.0 archive
0.2.1 Sep 4, 2016 Go to the documentation of json_java_converter 0.2.1 Download json_java_converter 0.2.1 archive
0.2.0 Aug 28, 2016 Go to the documentation of json_java_converter 0.2.0 Download json_java_converter 0.2.0 archive
0.1.0 Aug 9, 2016 Go to the documentation of json_java_converter 0.1.0 Download json_java_converter 0.1.0 archive
0.0.1 Aug 9, 2016 Go to the documentation of json_java_converter 0.0.1 Download json_java_converter 0.0.1 archive

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
98 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
61 / 100
Overall score:
Weighted score of the above. [more]
42

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:json_java_converter/json_java_converter.dart.

Suggestions

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use json_java_converter.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0
code_transformers >=0.4.2 <0.5.0 0.4.2+4 0.5.1+4
dart_style >=0.2.9 <0.3.0 0.2.16 1.0.9+1
Transitive dependencies
analyzer 0.29.11 0.31.0+1
args 0.13.7 1.3.0
async 2.0.3
barback 0.15.2+14
charcode 1.1.1
cli_util 0.0.1+2 0.1.2+1
collection 1.14.5
convert 2.0.1
crypto 2.0.2+1
csslib 0.14.1
glob 1.1.5
html 0.13.2+2
isolate 1.1.0
logging 0.11.3+1
meta 1.1.2
package_config 1.0.3
path 1.5.1
plugin 0.2.0+2
pool 1.3.4
source_maps 0.10.4
source_span 1.4.0
stack_trace 1.9.1
string_scanner 1.0.2
typed_data 1.1.5
utf 0.9.0+4
watcher 0.9.7+7
when 0.2.0
which 0.1.3
yaml 2.1.13
Dev dependencies
test >=0.12.0 <0.13.0