add another serialization code

suitable for lua

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>
improve data type handling

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>
fix the filter

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>
fix handling of 'None's

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>
escape quotes

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>