json_java_converter 0.0.1 copy "json_java_converter: ^0.0.1" to clipboard
json_java_converter: ^0.0.1 copied to clipboard

outdatedDart 1 only

A library for typed conversion between Java objects, serialized to Json, and native Dart objects.

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
0
likes
0
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

A library for typed conversion between Java objects, serialized to Json, and native Dart objects.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

code_transformers

More

Packages that depend on json_java_converter