williamthome/euneus

inet plugin on decode converts float-as-string to inet

leonardb opened this issue · 1 comments

I don't have a suggested fix right now, but I'm guessing that ensuring there are at least 4 parts separated by "." for ipv4 and that parts are separated by ":" would be a good check

euneus:decode(<<"{\"test\":\"0.000\",\"ip\":\"10.12.13.14\"}">>,#{plugins => [inet]}).
{ok,#{<<"ip">> => {10,12,13,14},<<"test">> => {0,0,0,0}}}

Thanks!