An open API service indexing awesome lists of open source software.

https://github.com/glebbatykov/jard

Package for json encode and decode.
https://github.com/glebbatykov/jard

Last synced: 4 months ago
JSON representation

Package for json encode and decode.

Awesome Lists containing this project

README

        

[![pub package](https://img.shields.io/pub/v/jard.svg?label=jard&color=blue)](https://pub.dev/packages/jard)

**Languages:**

[![English](https://img.shields.io/badge/Language-English-blue?style=?style=flat-square)](README.md)
[![Russian](https://img.shields.io/badge/Language-Russian-blue?style=?style=flat-square)](README.ru.md)

- [Using](#using)
- [Encode](#encode)
- [Decode](#decode)
- [Performance](#performance)
- [Encode perfomance](#encode-perfomance)

# 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:

```dart
import 'package:jard/jard.dart';

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

final json = Jard.encode(map);

print(json);
}
```

Expected output:

```dart
{"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.