1. A method implemented on a machine having at least one processor, storage, and communication platform, comprising: traversing through a data stream containing a plurality of name-value pairs organized in a multi-level nested data structure; and for each name-value pair encountered in the multi-level nested data structure, if the name-value pair is located at two levels outside an innermost level, then constructing a new table as a current table corresponding to the name-value pair, if the name-value pair is located at one level outside the innermost level, then constructing a new row within the current table as a current row corresponding to the name-value pair, and if the name-value pair is located at the innermost level, then adding the name-value pair to the current row of the current table as a field.
8. A method as recited in claim 1 , wherein traversing through the data stream employs a depth-first recursive algorithm.