pkulchenko/serpent — pull request #3 by jesstelford (2013-01-03 13:34:38+00:00)
Title: Allow serialization of only whitelisted keys

Example:

local a = {
foo = 'bar',
[1] = 2,
[true] = 'only me'
}

local options = {
keywhitelist = {
['foo'] = true,
[true] = true
},
ignore = {
['bar'] = true
}
}

print(serpent.block(a, options))

-- output:

{
[true] = "only me"
}