optimize Document, judge comma in key and introduce v2 functions.