DataInjector 0.3.1

DataInjector 0.3.1

Maintained by Crescent Flare.



  • By
  • Crescent Flare Apps

Data Injector

CI Status License Version Version

Data injector is a project to easily manipulate JSON data before being handled by the application. For example, to map restful API responses into view models together with view content or to fix API responses.

Use the library together with JsonInflator and UniLayout to share logic between iOS and Android and to develop them real-time simultaneously.

Features

  • Provides an easy way to access and modify nested data structures (like lists and maps on Android, or arrays and dictionaries on iOS)
  • Convert between data types easily
  • A set of injectors to help modify target data based on source data
  • A set of transformers to convert source data (also can be used together with injectors)

iOS integration guide

The library is available through CocoaPods. To install it, simply add the following line to your Podfile.

pod "DataInjector", '~> 0.3.1'

Android integration guide

When using gradle, the library can easily be imported into the build.gradle file of your project. Add the following dependency:

compile 'com.crescentflare.datainjector:DataInjectorLib:0.3.1'

Make sure that jcenter is added as a repository.

Example

The provided example shows how to map a structured table of customers into a list suitable for display in a table view (iOS) or recycler view (Android).

Status

The library is in its initial state but has basic functionality which can already be useful. However, there may be bugs. More features and utilities will be added in the future.