From 50d0d68f4583d960b4478dea8bc3c12ce0728c22 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Fri, 10 Jun 2022 15:00:34 +0100 Subject: [PATCH] Docs nitpick --- docs/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index dba0aa1a..64711235 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2756,7 +2756,8 @@ Return value: non-NULL on success, NULL or error Usage example: ```c -char *str = mg_json_get_str(mg_str("{\"a\":\"hi\"}", "$.a")); // str = "hi" +struct mg_str json = mg_str("{\"a\": \"hi\"}"); // json = {"a": "hi"} +char *str = mg_json_get_str(json, "$.a"); // str = "hi" free(str); ```