Change the JSON API function to be from a serialised struct

This is the first experiment towards using structs to define the API.
It adds it as a new method on the existing Chat struct.

The types in this struct could improve as well as many other things.
But this is a straight forward translation of the existing json! macro
into a struct.
This commit is contained in:
Floris Bruynooghe
2019-12-18 22:49:45 +01:00
committed by Floris Bruynooghe
parent f2f8898004
commit ec40dd1b6f
4 changed files with 144 additions and 55 deletions

View File

@@ -21,6 +21,7 @@ libc = "0.2"
human-panic = "1.0.1"
num-traits = "0.2.6"
failure = "0.1.6"
serde_json = "1.0"
[features]
default = ["vendored", "nightly", "ringbuf"]