markaren / yaj-rpc Goto Github PK
View Code? Open in Web Editor NEWYet Another JSON RPC (YAJ-RPC) is a JSON RPC 2.0 implementation for JVM languages, written in Kotlin
License: MIT License
Yet Another JSON RPC (YAJ-RPC) is a JSON RPC 2.0 implementation for JVM languages, written in Kotlin
License: MIT License
opening this as an issue as I cannot edit the wiki
https://github.com/markaren/YAJ-RPC/wiki/HTTP
implmented -> implemented
bundles -> bundled
I am having the following RPC method:
@RpcMethod
fun account_list(): List<String> {
println("accounts")
return listOf("0xafb2f771f58513609765698f65d3f2f0224a956f")
}
I would expect it to return:
{"jsonrpc":"2.0","id":43,"result":["0xafb2f771f58513609765698f65d3f2f0224a956f"]}
but it returns:
{"jsonrpc":"2.0","result":"[\"0xafb2f771f58513609765698f65d3f2f0224a956f\"]","id":43.0}
in this example the ID is changed from a int to a floating point value
โ> ~ curl --data '{"jsonrpc":"2.0","id":43,"method":"account_list","params":[]}' -H 'content-type:application/json' http://127.0.0.1:5000/ 17:19:35
{"jsonrpc":"2.0","result":"[{\"address\":\"afb2f771f58513609765698f65d3f2f0224a956f\",\"type\":\"account\",\"url\":\"keystore://foo\"}]","id":43.0}
I am currently running into:
method does not use '.' to separate service and method
caused by
val split = req.methodName!!.split("\\.".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
if (split.size != 2) {
val msg = "method does not use '.' to separate service and method"
LOG.warn(msg)
return createErrorResponse(id, RpcError.ErrorType.INVALID_REQUEST, msg)
}
I do not find anything in the json-rpc spec: https://www.jsonrpc.org/specification that states a method name must contain a dot.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.