<commit_before>= Lua CJSON 1.0devel Manual =
<NAME> <<EMAIL>>
:revdate: 30th November 2011

Overview
--------

Lua CJSON provides fast JSON parsing and encoding support for Lua.

.Features
- More than 10x to 20x faster than the efficient pure Lua JSON modules.
- Full support for JSON with UTF-8, including decoding surrogate
  pairs.
- Optional run-time support for common exceptions to the JSON
  specification (NaN, Inf,..).

.Caveats
- UTF-16 and UTF-32 are not supported.
- Multi-threading within a single Lua state is not supported.
  However, this is not a recommended configuration under Lua.

Lua CJSON is covered by the MIT license. See the file +LICENSE+ for
details.

The latest version of this software is available from the 
http://www.kyne.com.au/~mark/software/lua-cjson.php[Lua CJSON website].

Feel free to email me if you have any patches, suggestions, or
comments.


Installation Methods
--------------------

Lua CJSON requires either http://www.lua.org[Lua] or
http://www.luajit.org[LuaJIT] to build.

There are 3 build methods available:

Make::
  POSIX (including Linux, BSD, Mac OSX & Solaris)
RPM::
  Linux
LuaRocks::
  POSIX (including Linux, BSD, Mac OSX & Solaris), Windows


Build configuration overview
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lua CJSON uses +strtod+(3) and +snprintf+(3) to perform numeric
conversion as they are usually well supported, fast and bug free.

To ensure JSON encoding/decoding works correctly for locales using
comma decimal separators, Lua CJSON must be compiled with one of the
following ++#define++s:

USE_POSIX_USELOCALE::
  Thread safe. Supported by Linux and Mac OSX. Recommended where available.
USE_POSIX_SETLOCALE::
  Works on all ANSI C platforms. May be used when thread-safety isn't required.

Also available:

USE_INTERNAL_ISINF::
  Workaround for Solaris platforms missing isinf().


Make
~~~~

Review and update the included Makefile to suit your platform. Next,
build and install the module:

[source,sh]
-----------
make install
-----------

Or install manually:

[source,sh]
-----------
make
cp cjson.so $your_lua_module_directory<commit_msg>Clean up build options documentation in manual<commit_after>= Lua CJSON 1.0devel Manual =
<NAME> <<EMAIL>>
:revdate: 30th November 2011

Overview
--------

Lua CJSON provides fast JSON parsing and encoding support for Lua.

.Features
- More than 10x to 20x faster than the efficient pure Lua JSON modules.
- Full support for JSON with UTF-8, including decoding surrogate
  pairs.
- Optional run-time support for common exceptions to the JSON
  specification (NaN, Inf,..).

.Caveats
- UTF-16 and UTF-32 are not supported.
- Multi-threading within a single Lua state is not supported.
  However, this is not a recommended configuration under Lua.

Lua CJSON is covered by the MIT license. See the file +LICENSE+ for
details.

The latest version of this software is available from the 
http://www.kyne.com.au/~mark/software/lua-cjson.php[Lua CJSON website].

Feel free to email me if you have any patches, suggestions, or
comments.


Installation Methods
--------------------

Lua CJSON requires either http://www.lua.org[Lua] or
http://www.luajit.org[LuaJIT] to build.

There are 3 build methods available:

Make::
  POSIX (including Linux, BSD, Mac OSX & Solaris)
RPM::
  Linux
LuaRocks::
  POSIX (including Linux, BSD, Mac OSX & Solaris), Windows


Build options (#define)
~~~~~~~~~~~~~~~~~~~~~~~

Lua CJSON uses +strtod+(3) and +snprintf+(3) to perform numeric
conversion as they are usually well supported, fast and bug free. To
ensure JSON encoding/decoding works correctly for locales using comma
decimal separators, Lua CJSON may optionally be compiled with one of
the following (+#define+):

USE_POSIX_USELOCALE::
  Thread safe. Supported by Linux and Mac OSX. Recommended where available.
USE_POSIX_SETLOCALE::
  Works on all ANSI C platforms. Only use with single threaded programs.

Also available:

USE_INTERNAL_ISINF::
  Workaround for Solaris platforms missing isinf().


Make
~~~~

Review and update the included Makefile to suit your platform. Next,
build and install the module:

[source,sh]
-----------
make install
-----------

Or install manually:

[source,sh]
-----------
make
cp cjson.so $your_lua_module_directory
{'fraction_non_alphanumeric': 0.11022138483278379, 'fraction_numerical': 0.009420631182289214, 'mean_word_length': 3.755879059350504, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4683248', 'n_tokens_mistral': 1317, 'n_tokens_neox': 1230, 'n_words': 543}