Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/ristocloud-group/app-lib-typed-json-getters

A Dart library providing type-safe getters for JSON maps with robust error handling.
https://github.com/ristocloud-group/app-lib-typed-json-getters

dart extentions json-parsing type-safety

Last synced: 25 days ago
JSON representation

A Dart library providing type-safe getters for JSON maps with robust error handling.

Awesome Lists containing this project

README

        

# Typed JSON Getters

[![pub package](https://img.shields.io/pub/v/typed_json_getters.svg)](https://pub.dev/packages/typed_json_getters)
[![Build Status](https://img.shields.io/github/actions/workflow/status/ristocloud-group/app-lib-typed-json-getters/dart.yml)](https://github.com/ristocloud-group/app-lib-typed-json-getters/actions/workflows/dart.yml)
[![Coverage Status](https://github.com/ristocloud-group/app-lib-typed-json-getters/raw/gh-pages/coverage-badge.svg)](https://ristocloud-group.github.io/app-lib-typed-json-getters/)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)

A Dart library providing type-safe getters for JSON maps (`Map`) with robust error handling and support for nested keys using dot notation.

## Features

- **Type-Safe Access**: Retrieve values with explicit types.
- **Default Values**: Provide default values when keys are missing.
- **Error Handling**: Throws `FormatException` when type conversion fails.
- **Nested Key Support**: Access nested JSON properties using dot notation.

## Installation

Add `typed_json_getters` to your `pubspec.yaml`:

## Examples

Check out various [Examples](https://github.com/ristocloud-group/app-lib-typed-json-getters/blob/main/example/main.dart) to see how you can use these widgets in your Flutter projects.

## Contributing

We welcome contributions! Please see our [Contributing guide](https://github.com/ristocloud-group/app-lib-typed-json-getters/blob/main/.github/CONTRIBUTING.md) for more information.

## License

This project is licensed under the MIT License - see the [License](https://github.com/ristocloud-group/app-lib-typed-json-getters/blob/main/LICENSE) file for details.