convert between lua table and string.
there are only three common functions in this parser.
parser.dump
show a table in friendly way.parser.encode
convert a lua table to string.parser.decode
convert a string to lua table.
you can find examples in test file.
key of table can be string
, number
and boolen
. value of table can be string
, number
, boolen
and table
. other circumstances will cause an error.
parser.useStrict
if you are sure that you are not using special string type keys(like special characters, utf8 characters, string type numbers, punctuations, etc.) in your lua table, you can send a 'false' to this function for encoding keys simpler.