| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| | |
- Sanitised arg ordering to encode functions
- Commented json->tmp to explain why decode string processing uses
strbuf_*_unsafe() functions.
|
| |
| |
| |
| |
| |
| |
| | |
Only update the locale when the module is initialised.
cjson.new() can be used if the locale changes part way
through program execution.
|
| |
| |
| |
| |
| |
| | |
When encode_keep_buffer is false, a private buffer will be used.
This will allow multiple encoders to run within a single Lua
state.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update all Lua scripts to use new module init style everywhere:
local json = require "cjson"
Lua CJSON does not register a global table under Lua 5.2. The global
table can be disabled under Lua 5.1 with DISABLE_CJSON_GLOBAL.
Other changes:
- Store CJSON configuration as an upvalue for each function.
- Add "cjson.new" function to create another module table with a
separate configuration.
- Add _NAME and _VERSION variables.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Create a separate buffer and translate comma <> dot before calling
strtod(), and after calling sprintf() as required.
- Add "update_locale" Lua API call and init locale on module load.
- Move sprintf format string to fpconv
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
- Fix typo (keep_encode_buffer -> encode_keep_buffer)
- Update for consistency
- Remove duplicate sparse table example
- Change manual to use horizontal item lists
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
- Remove block quotes
- Add titles
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
build-packages.sh has several advantages:
- Automatically bumps version numbers
- Builds HTML documentation on the fly
|
| |
| |
| |
| |
| |
| |
| |
| | |
Merge quirks section into:
- Build overview (locales)
- API docs
Add API section for variables.
|
| | |
|
| |
| |
| |
| |
| | |
Display failed tests, and successful/total test counts.
Use "awk" to provide a portable "ggrep -E" with context.
|
| | |
|
| |
| |
| |
| |
| | |
The external #define complicates compilation but is only used in
lua_cjson.c and Makefile.
|
| |
| |
| |
| | |
Update runtests.sh to exit if an old copy of cjson.so is found.
|
| | |
|
| |
| |
| |
| |
| | |
Previously the the RPM build would overwrite CJSON_CFLAGS but didn't
provide the necessary default CFLAGS (-fpic -DVERSION ..).
|
| |
| |
| |
| |
| |
| |
| | |
- Rename README to manual.txt and add AsciiDoc markup
- Rewrite some sections of documentation (more outstanding)
- Add "doc" Makefile target
- Update RPM spec file to include HTML output
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Remove GNU make "override" statements.
- Add OBJS variable since there is no portable way to specify all
targets for linking.
Also:
- Put build defaults at the top to avoid potential confusion.
- Don't assume a Linux platform. Default to USE_POSIX_SETLOCALE.
- Change "install -d" to mkdir/install since the former isn't
available on some platforms (Solaris).
|
| |
| |
| |
| |
| |
| |
| | |
- Use Perl filehandles directly since IO::Handle generates
unicode warnings that can't be silenced.
- Disable all warnings since the specific "nonchar" warning only
exists in newer versions.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Luarocks does not support a "solaris" platform - USE_INTERNAL_ISINF must
stay commented.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add USE_POSIX_SETLOCALE option for platforms missing uselocale().
Document locale options in README, Makefile & rockspec.
Also:
- Rename USE_POSIX_LOCALE define to USE_POSIX_USELOCALE.
- Use uselocale() by default through Makefile (Linux, OSX).
- Use setlocale() by default through rockspec (other platforms).
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some locales (cs_CZ, de_DE,..) use a comma as their decimal separator.
This causes CJSON to generate incorrect JSON (Eg, [10,1]), and fail when
parsing some valid JSON (Eg, [10,"test"]).
Added USE_POSIX_LOCALE #define which harnesses the thread-safe
POSIX.1-2008 locale support (newlocale(), uselocale(), freelocale())
to temporarily use the POSIX locale during JSON conversion.
Some older POSIX operating systems with xlocale.h (MacOSX) are also
supported.
|