aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/json/json_file.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-19 00:10:22 +0900
committernsfisis <nsfisis@gmail.com>2026-05-19 00:11:03 +0900
commitc839244d8d09f3036ebfee8eef7eb6b147e593ab (patch)
treefe48c94f2c2e62468beef5ff1a8f3cff6adeef4f /crates/shirabe/src/json/json_file.rs
parent48839250146b217e2756ed3c0e624fd341b54d6c (diff)
downloadphp-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.tar.gz
php-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.tar.zst
php-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.zip
fix(compile): fix various compile errors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/json/json_file.rs')
-rw-r--r--crates/shirabe/src/json/json_file.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/shirabe/src/json/json_file.rs b/crates/shirabe/src/json/json_file.rs
index c1fa495..d08e207 100644
--- a/crates/shirabe/src/json/json_file.rs
+++ b/crates/shirabe/src/json/json_file.rs
@@ -401,7 +401,11 @@ impl JsonFile {
/// @param int $options json_encode options (defaults to JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)
/// @param string $indent Indentation string
/// @return string Encoded json
- pub fn encode(data: &PhpMixed, options: i64, indent: &str) -> String {
+ pub fn encode(data: &PhpMixed, options: i64) -> String {
+ Self::encode_with_indent(data, options, Self::INDENT_DEFAULT)
+ }
+
+ pub fn encode_with_indent(data: &PhpMixed, options: i64, indent: &str) -> String {
let json = json_encode_ex(data, options);
let json = match json {