utils library

Functions

build(String path, String file) → TreeNode
Xây dựng cây dữ liệu từ file JSON gốc
findNodeByKey(List<TreeNode> nodes, String key) → TreeNode?
Tìm kiếm một TreeNode trong danh sách dựa trên key Trả về node đầu tiên có key khớp, hoặc null nếu không tìm thấy
findOptionByKey(List<TreeOption> options, String key) → TreeOption?
Tìm kiếm một TreeOption trong danh sách dựa trên key Trả về option đầu tiên có key khớp, hoặc null nếu không tìm thấy
flatten<T>(List list) → List<T>
Làm phẳng một danh sách đa chiều thành danh sách một chiều Loại bỏ các phần tử null
parseNodes(String path, TreeNode node) → TreeNode
Phân tích và xử lý các node trong cây JSON Xử lý các tham chiếu (ref) bằng cách load file JSON tương ứng