Hi
Thanks for the library, I use it extensively and have done for many years now :-D
Would it be possible to get a configure option for how ftcsv should treat empty entries in the parsed CSV when outputting the lua table?
For example, a CSV that looks like this:
Ran through this code:
local csvraw = "C1,C2,C3\n\"Testing\",,\"Testing 2\""
local s = require("serpent")
local ftcsv = require("ftcsv")
local luatbl = ftcsv.parse(csvraw, ",", { loadFromString = true, })
print(s.block(luatbl))
Will output this:
{
{
C1 = "Testing",
C2 = "",
C3 = "Testing 2"
} --[[table: 0x58e728040940]]
} --[[table: 0x58e728024e40]]
However what I'd like is for C2 to be nil in this case.
Thoughts?
Thanks again!
Hi
Thanks for the library, I use it extensively and have done for many years now :-D
Would it be possible to get a configure option for how ftcsv should treat empty entries in the parsed CSV when outputting the lua table?
For example, a CSV that looks like this:
Ran through this code:
Will output this:
{ { C1 = "Testing", C2 = "", C3 = "Testing 2" } --[[table: 0x58e728040940]] } --[[table: 0x58e728024e40]]However what I'd like is for C2 to be
nilin this case.Thoughts?
Thanks again!