From bc622fcc151b6b0ee56ad93c74ea28d852b5121f Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Tue, 2 May 2017 00:56:28 +0200 Subject: [PATCH] README.md: Use cJSON_GetObjectItemCaseSensitive --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6b344cb..1d6fb8a 100644 --- a/README.md +++ b/README.md @@ -138,8 +138,8 @@ This is an object. We're in C. We don't have objects. But we do have structs. What's the framerate? ```c -cJSON *format = cJSON_GetObjectItem(root, "format"); -cJSON *framerate_item = cJSON_GetObjectItem(format, "frame rate"); +cJSON *format = cJSON_GetObjectItemCaseSensitive(root, "format"); +cJSON *framerate_item = cJSON_GetObjectItemCaseSensitive(format, "frame rate"); double framerate = 0; if (cJSON_IsNumber(framerate_item)) { @@ -150,7 +150,7 @@ if (cJSON_IsNumber(framerate_item)) Want to change the framerate? ```c -cJSON *framerate_item = cJSON_GetObjectItem(format, "frame rate"); +cJSON *framerate_item = cJSON_GetObjectItemCaseSensitive(format, "frame rate"); cJSON_SetNumberValue(framerate_item, 25); ```