pub package

Languages:

English Russian

Using

This package is used for encoding and decoding JSON.

At the moment, encoding has been implemented, faster than using jsonEncode from dart:convert.

Encode

Encoding is available using the static encode method of the Jard class.

Usage example:

import 'package:jard/jard.dart';

void main() {
  final map = <String, dynamic>{
    'name': 'Alex',
    'age': 22,
  };

  final json = Jard.encode(map);

  print(json);
}

Expected output:

{"name":"Alex","age":22}

Decode

Under development.

Performance

Encode perfomance

Execution time (microseconds) benchmark in JIT:

Execution time (microseconds) benchmark in AOT:

Memory costs do not differ, they are at the level of 1% error in various tests in the direction of Jard or dart:convert.

Libraries

jard