947 B
947 B
module json
Contents
decode
fn decode(typ voidptr, s string) !voidptr
decode tries to decode the provided JSON string, into a V structure. If it can not do that, it returns an error describing the reason for the parsing failure.
encode
fn encode(x voidptr) string
encode serialises the provided V value as a JSON string, optimised for shortness.
encode_pretty
fn encode_pretty(x voidptr) string
encode_pretty serialises the provided V value as a JSON string, in a formatted way, optimised for viewing by humans.
C.cJSON
struct C.cJSON {
valueint int
valuedouble f64
valuestring &char
}