added tableToJson conversion feature