if hist size = 0, not put hist to retur json string.