aboutsummaryrefslogtreecommitdiffstats
path: root/util/serialization.lua
Commit message (Collapse)AuthorAgeFilesLines
* util: Prefix module imports with prosody namespaceKim Alvefur2023-03-171-3/+3
|
* util.mathcompat: Module to ease reuse of math.type()Kim Alvefur2022-10-201-0/+4
| | | | | Mostly to ensure it is available during tests, as util.startup is not invoked there
* util.startup: Provide a common Lua 5.3+ math.type() for Lua 5.2Kim Alvefur2022-10-191-3/+1
| | | | Code deduplication
* util.serialization: Let freeze metamethod return a literal stringKim Alvefur2020-09-261-0/+4
| | | | | Enables custom serialization, such as creating a datatype that serializes into a variable reference.
* Merge 0.11->trunkKim Alvefur2019-07-081-16/+11
|\
| * util.serialization: Use util.hexKim Alvefur2019-03-171-9/+2
| |
| * util.serialization: Allow overriding table iteratorKim Alvefur2019-03-171-1/+6
| | | | | | | | | | | | | | Could be useful to eg swap it out with sorted_pairs to get a stable serialization. Default to next() wrapper to avoid metatable tricks from pairs().
| * util.serialization: Optimize handling of last table separatorKim Alvefur2019-03-171-7/+5
| | | | | | | | Fewer next() calls and a step towards allowing use of a different iterator.
| * lint: Remove use of the 143 error codeKim Alvefur2018-12-081-1/+0
| | | | | | | | Does not appear to be invoked by anything
* | util.serialization: Cache default serialization instance (fixes #1389)Kim Alvefur2019-07-081-1/+6
|/ | | | | | Most serialization uses still use the default serialize() and thus duplicate much of the setup, which negates some of the performance improvements of the rewrite.
* util.serialization: Encode non-fatal error in way that can be restoredKim Alvefur2018-10-271-1/+1
| | | | It could previously encode to eg `{ [nil] = ... }` which doesn't get decoded
* util.serialization: Rename non-fatal fallback handler for clarityKim Alvefur2018-10-271-3/+3
|
* util.serialization: Disable use of unquoted table keys by defaultKim Alvefur2018-10-271-1/+3
| | | | For safety against future new keywords
* util.serialization: Add option for allowing multiple references to the same ↵Kim Alvefur2018-10-271-0/+10
| | | | table (but not cycles)
* util.serialization: Separate errors for multiple table references and max depthKim Alvefur2018-10-271-2/+5
|
* util.serialization: Make maximum table depth configurableKim Alvefur2018-10-271-1/+2
|
* util.serialization: Remove encoding of very large or very small numbers in ↵Kim Alvefur2018-10-121-12/+1
| | | | | | | | scientific notation Also difficult to describe this option, easier to remove it. %.18g covers a very large range of numbers
* util.serialization: Simpler metatable pre-processingKim Alvefur2018-10-121-14/+12
| | | | It was too difficult to describe what it did.
* util.serialization: Use '=' prefix for chunk source descriptionKim Alvefur2018-10-111-1/+1
| | | | Like in bd5e4485a245
* util.serialization: Make check of prefix for optional hex encoding stricterKim Alvefur2018-10-111-1/+1
|
* util.serialization: Make errors fatal by default (like the previous ↵Kim Alvefur2018-10-111-1/+1
| | | | implementation)
* util.serialization: Stricter type checkKim Alvefur2018-09-231-1/+1
|
* util.serialization: Tighten up type checksKim Alvefur2018-07-291-2/+2
|
* util.serialization: Rewritte for performance and flexibilityKim Alvefur2018-07-101-58/+238
| | | | ... and because rewrites are fun!
* vairious: Add annotation when an empty environment is set [luacheck]Kim Alvefur2018-02-281-0/+1
|
* util.*: Remove use of module() function, make all module functions local and ↵Kim Alvefur2015-02-211-5/+9
| | | | return them in a table at the end
* util.serialization: Remove unused imports of error() and loadstring() [luacheck]Matthew Wild2015-05-061-2/+0
|
* Remove all trailing whitespaceFlorian Zeitz2013-08-091-1/+1
|
* Eliminate direct setfenv usageFlorian Zeitz2012-06-081-3/+3
|
* util.serialization: Proper serialization of Infinity, -Infinity and NaN.Waqas Hussain2010-12-131-2/+8
|
* util.serialization: Implemented deserialize().Waqas Hussain2010-12-121-1/+12
|
* Update copyright headers for 2010Matthew Wild2010-03-221-2/+2
|
* util.serialization: Correctly serialize tables with 'false' as a key, fixes ↵vault/0.6.10.6.1Matthew Wild2009-11-251-1/+1
| | | | an issue with rosters not saving (thanks mathias, Tobias)
* util.serialization: Replaced commas with semi-colons between table fields.Waqas Hussain2009-11-231-1/+1
|
* util.serialization: Concise output for empty tables.Waqas Hussain2009-11-231-13/+18
|
* Remove version number from copyright headersMatthew Wild2009-07-101-1/+1
|
* util/serialization: Fixed serialization formattingWaqas Hussain2009-05-081-1/+1
|
* util.serialization: Write nil for non-serializable data types, and bump the ↵vault/0.4.10.4.1Matthew Wild2009-05-051-1/+2
| | | | log level to 'error'
* util.serialization: Log a warning when trying to serialize something we can'tMatthew Wild2009-05-041-1/+3
|
* 0.3->0.4Matthew Wild2009-03-201-1/+1
|
* Update copyright notices for 2009Matthew Wild2009-01-301-2/+2
|
* 0.2->0.3Matthew Wild2009-01-301-1/+1
|
* GPL->MIT!Matthew Wild2009-01-301-13/+2
|
* 0.1 -> 0.2Matthew Wild2008-12-101-1/+1
|
* Added module util.serializationWaqas Hussain2008-12-041-0/+81