Files
herolib/aiprompts/v_core/json/json.md
2025-09-02 07:49:10 +02:00

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.

[Return to contents]

encode

fn encode(x voidptr) string

encode serialises the provided V value as a JSON string, optimised for shortness.

[Return to contents]

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.

[Return to contents]

C.cJSON

struct C.cJSON {
	valueint    int
	valuedouble f64
	valuestring &char
}

[Return to contents]

Powered by vdoc. Generated on: 2 Sep 2025 07:37:38