pub fn calc_literal_cost<T>(e: &T, allow_non_json_value: bool) -> (bool, usize)where
    T: VisitWith<LiteralVisitor>,