Issue:
Empty whitespace between nodes (because of formatting) was converted to text nodes having only whitespace, since these text nodes were between block nodes they were wrapped in fragment node, causing extra fragment node to be inserted in JSON. Solution:
Added condition to check for text nodes with empty white space using trim and length which are present inside table, tbody, thead, tr
Issue: Empty whitespace between nodes (because of formatting) was converted to text nodes having only whitespace, since these text nodes were between block nodes they were wrapped in fragment node, causing extra fragment node to be inserted in JSON.
Solution: Added condition to check for text nodes with empty white space using trim and length which are present inside table, tbody, thead, tr