From aef54f5f28344622222ec2e0c550c32ca91e151a Mon Sep 17 00:00:00 2001 From: Flaghacker Date: Sat, 3 Feb 2018 16:55:45 +0100 Subject: [PATCH] Fixed README to call encode and decode in method format --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5f95beb..c51fd65 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,13 @@ The library provides the following functions: #### json.encode(value) Returns a string representing `value` encoded in JSON. ```lua -json.encode({ 1, 2, 3, { x = 10 } }) -- Returns '[1,2,3,{"x":10}]' +json:encode({ 1, 2, 3, { x = 10 } }) -- Returns '[1,2,3,{"x":10}]' ``` #### json.decode(str) Returns a value representing the decoded JSON string. ```lua -json.decode('[1,2,3,{"x":10}]') -- Returns { 1, 2, 3, { x = 10 } } +json:decode('[1,2,3,{"x":10}]') -- Returns { 1, 2, 3, { x = 10 } } ``` ## Notes