Skip to content

Instantly share code, notes, and snippets.

@ntoskrnl
Last active September 30, 2017 19:47
Show Gist options
  • Save ntoskrnl/1aa0deec7cf94fe20e5fc3e1c10a094c to your computer and use it in GitHub Desktop.
Save ntoskrnl/1aa0deec7cf94fe20e5fc3e1c10a094c to your computer and use it in GitHub Desktop.
Annotation-based approach to build JSON-RPC requests
interface MyService {
@JsonRpc("myMethod")
fun myMethod(@JsonRpc("param1") a: Int,
@JsonRpc("param2") b: String,
@JsonRpc("param3") c: List<Int> = emptyList()): Single<MyResponse>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment