This commit is contained in:
2025-08-29 09:48:13 +02:00
parent b146261432
commit 03bb86bd72
113 changed files with 113 additions and 95 deletions

View File

@@ -58,7 +58,7 @@ pub fn decode_request(data string) !Request {
// Returns:
// - A JSON string representation of the Request
pub fn (req Request) encode() string {
return json2.encode(req)
return json2.encode_pretty(req)
}
// validate checks if the Request object contains all required fields
@@ -158,5 +158,5 @@ pub fn decode_request_generic[T](data string) !RequestGeneric[T] {
// Returns:
// - A JSON string representation of the RequestGeneric object
pub fn (req RequestGeneric[T]) encode[T]() string {
return json2.encode(req)
return json2.encode_pretty(req).replace('\\/', '/')
}