Add encode_empty_table_as_object which controls how to encode empty table