aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorMark Pulford <mark@kyne.com.au>2011-05-10 22:32:01 +0930
committerMark Pulford <mark@kyne.com.au>2011-05-10 22:32:01 +0930
commit126470cc7b6c2314c02805e4d00afe04b6b00312 (patch)
tree9dd59bcc02307403410ef405b0f02bf39bd57560 /README
parentc877da6c1f84b19cd2e7e8154b4a0d0e355745a0 (diff)
downloadlua-cjson-126470cc7b6c2314c02805e4d00afe04b6b00312.tar.gz
lua-cjson-126470cc7b6c2314c02805e4d00afe04b6b00312.tar.bz2
lua-cjson-126470cc7b6c2314c02805e4d00afe04b6b00312.zip
Add runtime option for persistent encode buffer
Diffstat (limited to 'README')
-rw-r--r--README17
1 files changed, 15 insertions, 2 deletions
diff --git a/README b/README
index 1ff12d9..3fa7595 100644
--- a/README
+++ b/README
@@ -34,8 +34,7 @@ Build requirements:
34Or: 34Or:
35- LuaJIT (http://www.luajit.org/) 35- LuaJIT (http://www.luajit.org/)
36 36
37The included Makefile should be reviewed. Updated the Makefile to suit 37Review and update the included Makefile to suit your platform. Then:
38your platform and Lua header/library directories. Then:
39 38
40 # make 39 # make
41 # make install 40 # make install
@@ -66,6 +65,7 @@ Synopsis
66 setting = cjson.refuse_invalid_numbers([setting]) 65 setting = cjson.refuse_invalid_numbers([setting])
67 depth = cjson.encode_max_depth([depth]) 66 depth = cjson.encode_max_depth([depth])
68 convert, ratio, safe = cjson.encode_sparse_array([convert[, ratio[, safe]]]) 67 convert, ratio, safe = cjson.encode_sparse_array([convert[, ratio[, safe]]])
68 keep = cjson.encode_keep_buffer([keep])
69 69
70 70
71Encoding 71Encoding
@@ -204,6 +204,19 @@ the application. Eg:
204 a = {}; b = { a }; a[1] = b 204 a = {}; b = { a }; a[1] = b
205 205
206 206
207Persistent encoding buffer
208-------------------------
209
210 keep = cjson.keep_encode_buffer([keep])
211 -- "keep" must be a boolean
212
213By default, CJSON will reuse the JSON encoding buffer to improve
214performance. The buffer will grow to the largest size required and is
215not freed until CJSON is garbage collected. Setting this option to
216"false" will cause the buffer to be freed after each call to
217cjson.encode().
218
219
207References 220References
208========== 221==========
209 222