This commit is contained in:
2025-09-02 08:44:44 +02:00
parent c9dc8fb44b
commit 3af0aef6c1
15 changed files with 573 additions and 126 deletions

View File

@@ -4,6 +4,12 @@ import json
import x.json2 { Any }
import freeflowuniverse.herolib.schemas.jsonschema { Reference, decode_schemaref }
pub fn decode_json_any(data string) !Any {
// mut o:=decode(data)!
return json2.decode[json2.Any](data)!
}
pub fn decode(data string) !OpenRPC {
// mut object := json.decode[OpenRPC](data) or { return error('Failed to decode json\n=======\n${data}\n===========\n${err}') }
mut object := json.decode(OpenRPC, data) or {