This commit is contained in:
2025-09-02 08:52:51 +02:00
parent 3af0aef6c1
commit 418a38527a
8 changed files with 81 additions and 50 deletions

View File

@@ -9,6 +9,12 @@ pub fn decode_json_any(data string) !Any {
return json2.decode[json2.Any](data)!
}
pub fn decode_json_string(data string) !string {
mut o := decode(data)!
return json.encode(o)!
}
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}') }