Json MessagePack convertor library for android.
(!)Please, download download library as .arr file. There is small error with building with jitpack. Sorry, for this! I need a free time to fix it.
To get a Git project into your build:
Step 1. Add the JitPack repository to your build file
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
...
implementation 'com.github.Mahmudxon:msgpack-android:VERSION'
}
You can use with retrofit and Gson :
Retrofit.Builder()
.addConverterFactory(MsgPackConvertorFactory())
...
.build()
or
val msgpack = Msgpack()
val textJson = ANY_JSON
val msgData = msgpack.convertFromJson(textJson) // MessagePack Data
val jsonData = msgpack.convertToJson(msgData)