dynamic_json 0.0.1

Dart native js
Flutter Android iOS web

Retrieves the value from inside the JSON/Map using dot operator.

Access JSON attributes with dot operator. #

Dynamic is a function that accepts JSON (Map), and returns a DynamicObject. With DynamicObject, we can take values ​​from JSON using dot operators instead of using brackets. We can also chain dot operators to retrieve nested values ​​from the Object too. When we perform chain calls, the last call must be closed with parentheses (as if calling a function) to get the actual value.

license.

Usage #

A simple usage example:

import 'package:dynamic_json/dynamic_json.dart';

main() {
    final person = Dynamic({ "FirstName" : "Marsa" , "LastName" : "Emreef" , "Address" :{ "City" : "Dubai" , "Phone" : "050123456"  , "Favorites" : ["JavaScript","ActionScript","Java","Dart"]}});
    print(person.FirstName()); // Marsa
    print(person.Address.City()); // Dubai
    print(person.Address.Favorites()); // ["JavaScript","ActionScript","Java","Dart"]
    print(person.Address.Favorites[0]()); // JavaScript
}
0
likes
100
pub points
12%
popularity

Retrieves the value from inside the JSON/Map using dot operator.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

marsa.emreef@gmail.com

License

MIT (LICENSE.md)

More

Packages that depend on dynamic_json