JSON pretty printing indentation using tabs or double spaces
Đang mở
@bukka đang làm issue này rồi.
Từ ngày 29/7/2022.
Extension: json
Feature
Status: Requires RFC
- Ngôn ngữ chính
- C
- Star
- 40.4k
- Fork
- 8.1k
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 96
Mô tả
Description
The current indentation of pretty printed JSON with json_encode() is using 4 bytes per level.
I feel we are lacking the ability to choose intendation type, i.e. for optimization.
Example:
- Tab (1 bytes)
- Two spaces (2 bytes)
- Four spaces (4 bytes)
Maybe by setting a flag to either:
JSON_PRETTY_PRINT
JSON_PRETTY_PRINT_TABS
JSON_PRETTY_PRINT_DOUBLE_SPACES
I know that we can preg_replace() it the way we want. But why waste resources if we could have it at the core.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.