The skip_undefined option, which introduced by #53, has a bug such that if an entry having the undefined value is placed at the last in an object, the encoded JSON object has an extra comma as follows:
> jsone:encode(#{a => [#{a => undefined, b => c, d => undefined}]}, [skip_undefined]).
<<"{\"a\":[{\"b\":\"c\",}]}">>
The
skip_undefined
option, which introduced by #53, has a bug such that if an entry having theundefined
value is placed at the last in an object, the encoded JSON object has an extra comma as follows:This PR fixes the bug.